tutorial · bandit

Bandit Level 9

Find the only line that occurs once (sort + uniq).
banditsortuniqpipes
Optional narration
Marks this level complete in your browser.

Goal

The password is in data.txt and is the only line of text that occurs only once.

Key concept

To use uniq, identical lines must be adjacent — so you almost always pair it with sort.

Steps

  1. SSH in:
ssh bandit9@bandit.labs.overthewire.org -p 2220
  1. Find the unique line:
sort data.txt | uniq -u

That output is the password for Level 10.

Notes

  • uniq -u prints only lines that are not repeated.
  • If you want counts for intuition:
sort data.txt | uniq -c | sort -n | tail