# uniq command filters outputs to be unique. For example: sort letters.txt a b b c c c sort letters.txt | uniq a b c sort dogs.txt | uniq -d # Only shows duplicated lines b c