Key commands
Sort, uniq, cat Merge multiple files cat file1 file2> newfile view repeat sort file1 in the file | uniq-d view only one sort file in the file | uniq-u more detailed command, please refer to the explanation of sort, uniq, and CAT commands uniq -- Help
$ Uniq -- Help
Usage: uniq [Option]... [input [Output]
Discard all but one of successive identical lines from input (or
Standard input), writing to output (or standard output ).
Mandatory arguments to long options are mandatory for short options too.
-C, -- count prefix lines by the number of occurrences
-D, -- repeated only print duplicate lines
-D, -- all-repeated [= delimit-method] print all duplicate lines
Delimit-method = {none (default), prepend, separate}
Delimiting is done with blank lines.
-F, -- skip-fields = n avoid comparing the first n Fields
-I, -- ignore-case ignore differences in case when comparing
-S, -- skip-chars = n avoid comparing the first n characters
-U, -- Unique only print unique lines
-W, -- check-chars = n compare no more than n characters in lines
-- Help display this help and exit
-- Version output version information and exit