Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash count duplicate lines in a file

# Basic syntax:
sort input_file | uniq -c 
# Sort the file first because uniq requires a sorted file to work
 
PREVIOUS NEXT
Tagged: #bash #count #duplicate #lines #file
ADD COMMENT
Topic
Name
3+1 =