hpux man page for uniq

Query: uniq

OS: hpux

Section: 1

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

uniq(1) 						      General Commands Manual							   uniq(1)

NAME
uniq - report repeated lines in a file
SYNOPSIS
fields] chars] [input_file [output_file]]
DESCRIPTION
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 Options recognizes the following options when comparing adjacent lines: Print those lines that are repeated in the original file. Print copy only of each repeated line in the input file. Generate an output report in default style except that each line is preceded by a count of the number of times it occurred. If this option is specified, the and options are ignored if either or both are also present. If none of the options or are present, prints the results of the union of the and 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 Options Two options are provided for skipping an initial portion of each line when making comparisons: Ignore the first fields fields, together with any blanks before each. fields is a positive decimal integer. A field is defined as a string of non-space, non-tab characters separated by tabs and/or spaces from its neighbors. Ignore the first chars characters. chars is a positive decimal integer. Each line in the input is assumed to be terminated with a new line character for purposes of comparison. Fields are skipped before characters.
EXTERNAL INFLUENCES
Environment Variables must be equal to the value it had when the input files were sorted. determines the interpretation of text within files as single- and/or multi-byte characters, and defines a space character when the or option is used. determines the language in which messages are displayed. If or is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty variable. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See environ(5). International Code Set Support Single- and multi-byte character code sets are supported.
RETURN VALUE
Exit values are: 0 Successful completion. >0 Error condition occurred.
AUTHOR
was developed by OSF and HP.
SEE ALSO
comm(1), sort(1).
STANDARDS CONFORMANCE
uniq(1)
Related Man Pages
uniq(1) - mojave
uniq(1p) - centos
uniq(1p) - suse
uniq(1) - opendarwin
uniq(1) - freebsd
Similar Topics in the Unix Linux Community
find a string and copy the string after that
File Field Replacement, Assigning Fields to Variables, Lists/Arrays?
Join fields in a same file based on condition
Reading between a repeated string
Export lines that have first entry repeated 5 times or above