May 2000
Beginner
761 pages
18h 20m
English
uniq [ [ –u ] [ –d ] [ –c ] [ +n ] [ –n ] ] [ input [ output ] ]
uniq reads the input file, comparing adjacent lines. In the normal case, the second and succeeding copies of repeated lines are removed; the remainder is written on the output file. Input and output should always be different.
1 uniq file1 file2 2 uniq -d -2 file3 |
Explanation
Removes duplicate adjacent lines from file1 and puts output in file2.
Displays the duplicate lines where the duplicate starts at third field.
Read now
Unlock full access