Uniq

Until today I didn’t know that the Gnu/Linux command uniq had a -w option.

The option tells how many characters that should be compared.

uniq -w5 only compares the first five characters for every row.

You can also skip characters with -s.
Or print out ONLY the duplicates -D.