MAN page from Old RedHat 5.X textutils-1.22-5.i386.rpm
UNIQ
Section: User Commands (1)
Updated: GNU Text Utilities
Index NAME
uniq - remove duplicate lines from a sorted file
SYNOPSIS
uniq[-cdu] [-f skip-fields] [-s skip-chars] [-w check-chars][-#skip-fields] [+#skip-chars] [--count] [--repeated] [--unique][--skip-fields=skip-fields] [--skip-chars=skip-chars][--check-chars=check-chars] [--help] [--version] [infile] [outfile]
DESCRIPTION
This documentation is no longer being maintained and may be inaccurateor incomplete. The Texinfo documentation is now the authoritative source.
This manual pagedocuments the GNU version ofuniq.uniqprints the unique lines in a sorted file, discarding all but one of arun of matching lines. It can optionally show only lines that appearexactly once, or lines that appear more than once.uniqrequires sorted input because it compares only consecutive lines.
If the output file is not specified,uniqwrites to the standard output. If the input file is not specified, itreads from the standard input.
OPTIONS
- -u, --unique
- Only print unique lines.
- -d, --repeated
- Only print duplicate lines.
- -c, --count
- Print the number of times each line occurred along with the line.
- -number, -f, --skip-fields=number
- In this option, number is an integer representing the number offields to skip over before checking for uniqueness. The firstnumber fields, along with any blanks found before numberfields is reached, are skipped over and not counted. Fields aredefined as a strings of non-space, non-tab characters, that areseparated from each other by spaces and tabs.
- +number, -s, --skip-chars=number
- In this option, number is an integer representing the number ofcharacters to skip over before checking for uniqueness. The firstnumber characters, along with any blanks found beforenumber characters is reached, are skipped over and not counted.If you use both the field and character skipping options, fields areskipped over first.
- -w, --check-chars=number
- Specify the number of characters to compare in the lines, afterskipping any specified fields and characters. Normally the entirerest of the lines are compared.
- --help
- Print a usage message and exit with a status code indicating success.
- --version
- Print version information on standard output then exit.
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
This document was created byman2html,using the manual pages.