[WarGame] Bandit, Level 8 → Level 9
Problem

패스워드는 오직 한번만 나오는 단어라고 한다.
sort가 맞을 듯..?
Solving
매우 재미있는 옵션 발견..!?
bandit8@bandit:~$ sort --help
# .... 생략
sort --help
-u, --unique with -c, check for strict ordering;
without -c, output only the first of an equal run
이게 아닌거 같아서, 힌트에 있는 uniq를 찾아봤다.
bandit8@bandit:~$ uniq --help
Mandatory arguments to long options are mandatory for short options too.
-c, --count prefix lines by the number of occurrences
두개를 조합하면 되겠다.
sort data.txt | uniq -c
Refer
'워게임' 카테고리의 다른 글
[WarGame] Bandit, Level 10 → Level 11 (0) | 2023.03.19 |
---|---|
[WarGame] Bandit, Level 9 → Level 10 (0) | 2023.03.19 |
[WarGame] Bandit, Level 7 → Level 8 (0) | 2023.03.19 |
[WarGame] Bandit, Level 6 → Level 7 (0) | 2023.03.19 |
댓글