Finding duplicate lines with sed

Something simple and useful. Finding the duplicate lines in UNIX is done with the following series of commands:

sort [file] | uniq -c | awk '$1 !~/1/'

Leave a Comment

(required)
(will not be published) (required)