how to remove duplicate lines in a file using shell script code example Example: removing duplicate input from a file in the command line sort -u .txt