|
|
1.1 ! root 1: .TH UNIQ 1 ! 2: .CT 1 files ! 3: .SH NAME ! 4: uniq \- report repeated lines in a file ! 5: .SH SYNOPSIS ! 6: .B uniq ! 7: [ ! 8: .B -udc ! 9: [ ! 10: .BI +- num ! 11: ] ! 12: ] ! 13: [ ! 14: .I file ! 15: ] ! 16: .SH DESCRIPTION ! 17: .I Uniq ! 18: copies the input ! 19: .I file, ! 20: or the standard input, to the ! 21: standard output comparing adjacent lines. ! 22: In the normal case, the second and succeeding copies ! 23: of repeated lines are ! 24: removed. ! 25: Repeated lines must be adjacent ! 26: in order to be found. ! 27: .TP ! 28: .B -u ! 29: Print unique lines. ! 30: .TP ! 31: .B -d ! 32: Print (one copy of) duplicated lines. ! 33: .TP ! 34: .B -c ! 35: Prefix a repetition count and a tab to each output line. ! 36: Implies ! 37: .B -u ! 38: and ! 39: .BR -d . ! 40: .TP ! 41: .BI - num ! 42: The first ! 43: .IR num ! 44: fields ! 45: together with any blanks before each are ignored. ! 46: A field is defined as a string of non-space, non-tab characters ! 47: separated by tabs and spaces from its neighbors. ! 48: .TP ! 49: .BI + num ! 50: The first ! 51: .IR num ! 52: characters are ignored. ! 53: Fields are skipped before characters. ! 54: .SH EXAMPLES ! 55: .TP ! 56: .B ! 57: cut -d: -f3 /etc/passwd | sort | uniq -d ! 58: Print duplicated userids from the password file, ! 59: .IR passwd (5). ! 60: .I Cut ! 61: picks out the userid (the third colon-delimited field) and ! 62: .I sort ! 63: brings repetitions together. ! 64: .SH "SEE ALSO" ! 65: .IR sort (1), ! 66: .IR comm (1) ! 67: .SH BUGS ! 68: Field-selection and comparison should be compatible with ! 69: .IR sort (1).
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.