]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r355777:
authorIan Lepore <ian@FreeBSD.org>
Sun, 22 Dec 2019 20:34:15 +0000 (20:34 +0000)
committerIan Lepore <ian@FreeBSD.org>
Sun, 22 Dec 2019 20:34:15 +0000 (20:34 +0000)
commitbeff530ff56c9536e56f78df4fd679dce56a05fb
tree3cccff51dda5ade9f15a1a4f4244c1d2cc8b2360
parentd6f46774e008c36040659d666bab46846d805b41
MFC r355777:

Support --all-repeats in uniq(1) for compatibility with gnu coreutils.

This adds a new -D/--all-repeats option to uniq(1), which outputs each copy
of any repeated lines (as opposed to a single copy of a repeated line). You
can specify a separator option to output a blank line before or after each
group of repeated lines. This adds compatibility with the GNU coreutils
version of uniq(1).

This change also re-groups the -c, -d, -D, -u options in the usage display
and man page to indicate that they are mutally exclusive of each other. This
matches the posix/opengroup definition of uniq(1) command line args. Note
that this change does NOT actually enforce the mutual exclusion in the code,
for now, it simply documents that the arguments should be considered
exclusive with each other.

Differential Revision: https://reviews.freebsd.org/D22262
usr.bin/uniq/uniq.1
usr.bin/uniq/uniq.c