|
|
HP-UX Reference Volume 1 of 5 > uuniq(1) |
|
NAMEuniq — report repeated lines in a file DESCRIPTIONuniq reads the input text file input_file, comparing adjacent lines, and copies the result to output_file. If input_file is not specified, the standard input and standard output are used. If input_file is specified, but output_file is not, results are printed to standard output. input_file and output_file must not be the same file. Line-Comparison Optionsuniq recognizes the following options when comparing adjacent lines:
If none of the options u, d, or c are present, uniq prints the results of the union of the -u and -d options, producing a copy of the original input file with the second and succeeding copies of any repeated lines removed. (Note that repeated lines must be adjacent in order to be found — see sort(1)). Field-Skip OptionsTwo options are provided for skipping an initial portion of each line when making comparisons:
EXTERNAL INFLUENCESEnvironment VariablesLC_COLLATE must be equal to the value it had when the input files were sorted. LC_CTYPE determines the interpretation of text within files as single- and/or multi-byte characters, and defines a space character when the -f or -s option is used. LC_MESSAGES determines the language in which messages are displayed. If LC_COLLATE, LC_CTYPE or LC_MESSAGES is not specified in the environment or is set to the empty string, the value of LANG is used as a default for each unspecified or empty variable. If LANG is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG. If any internationalization variable contains an invalid setting, uniq behaves as if all internationalization variables are set to "C". See environ(5). |
|