home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / man / man1 / uniq.1 < prev    next >
Encoding:
Text File  |  1975-06-26  |  1.3 KB  |  66 lines

  1. .th UNIQ I 12/1/72
  2. .sh NAME
  3. uniq \*- report repeated lines in a file
  4. .sh SYNOPSIS
  5. .bd uniq
  6. [
  7. .bd \*-udc
  8. [ \fB+\fRn ] [ \fB\*-\fRn ]
  9. ] [ input [ output ] ]
  10. .sh DESCRIPTION
  11. .it Uniq
  12. reads the input
  13. file comparing adjacent lines.
  14. In the normal case, the second and succeeding copies
  15. of repeated lines are
  16. removed; the remainder is written on the output file.
  17. Note that repeated lines must be adjacent
  18. in order to be found;
  19. see sort(I).
  20. If the
  21. .bd \*-u
  22. flag is used,
  23. just the lines that are not repeated
  24. in the original file are output.
  25. The
  26. .bd \*-d
  27. option specifies that
  28. one copy of just the repeated lines is to
  29. be written.
  30. The normal mode output is the union of the
  31. .bd \*-u
  32. and
  33. .bd \*-d
  34. mode outputs.
  35. .s3
  36. The
  37. .bd \*-c
  38. option supersedes
  39. .bd \*-u
  40. and
  41. .bd \*-d
  42. and generates
  43. an output report in default style
  44. but with each line preceded by a count of the
  45. number of times it occurred.
  46. .s3
  47. The
  48. .it n
  49. arguments specify skipping an initial portion of each line
  50. in the comparison:
  51. .s3
  52. .lp +8 4
  53. \fB\*-\fIn\fR    The first \fIn\fR fields
  54. together with any blanks before each are ignored.
  55. A field is defined as a string of non-space, non-tab characters
  56. separated by tabs and spaces from its neighbors.
  57. .s3
  58. .lp +8 4
  59. \fB+\fIn\fR    The first \fIn\fR characters are ignored.
  60. Fields are skipped before characters.
  61. .i0
  62. .s3
  63. .sh "SEE ALSO"
  64. sort (I), comm (I)
  65. .sh BUGS
  66.