How do I print duplicate lines in Linux?

Kim Thu Đoàn

New member
How do I print duplicate lines in Linux?
Answer
Explanation: The awk script just prints the 1st space separated field of the file. Use $N to print the Nth field. sort sorts it and uniq -c counts the occurrences of each line.
 

Tìm kiếm

Back
Top