Answers for "bash how to keep one instance of duplicate lines"

1

bash how to keep one instance of duplicate lines

# Basic syntax:
sort input_file | uniq
# Sort the file first because uniq requires a sorted file to work. Uniq
# then eliminates all duplicated lines in the file, keeping one instance
# of each duplicated line
Posted by: Guest on October-03-2020

Code answers related to "bash how to keep one instance of duplicate lines"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language