uniq(1) minix man page | unix.com

Man Page: uniq

Operating Environment: minix

Section: 1

UNIQ(1) 						      General Commands Manual							   UNIQ(1)

NAME
uniq - delete consecutive identical lines in a file
SYNOPSIS
uniq [-cdu] [-n] [+n] [input [output]]
OPTIONS
-c Give count of identical lines in the input -d Only duplicate lines are written to output -u Only unique lines are written to output -n Skip the first n columns when matching +n Skip the first n fields when matching
EXAMPLES
uniq +2 file # Ignore first 2 fields when comparing uniq -d inf outf # Write duplicate lines to outf
DESCRIPTION
Uniq examines a file for consecutive lines that are identical. All but duplicate entries are deleted, and the file is written to output. The +n option skips the first n fields, where a field is defined as a run of characters separated by white space. The -n option skips the first n spaces. Fields are skipped first.
SEE ALSO
sort(1). UNIQ(1)
Related Man Pages
uniq(1) - linux
uniq(1) - v7
uniq(1) - suse
uniq(1) - netbsd
uniq(1) - x11r4
Similar Topics in the Unix Linux Community
Concatenating column values with unique id into single row
Getting non unique lines from concatenated files
Keywords and Tags (Please Contribute)
Using grep and a parameter file to return unique values
Filter uniq field values (non-substring)