#compsci The uniq command is a command used to remove duplicates in a file: ![[Pasted image 20230220171635.png]] You can fetch the number of occurences of a line: $ uniq -c file **WARNING**: uniq does not detect duplicate lines unless they are adjacent, so use in combination with uniq: $ sort file | uniq