Removing duplicate lines in a file

Manager's picture

Removing duplicate lines with uniq use the command:

uniq in_file out_file

Only works on files that are sorted

To sort a file use

sort filename