Page MenuHomeFreeBSD

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

Authored by ian on Nov 6 2019, 6:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 1:52 PM
Unknown Object (File)
Tue, Dec 10, 6:29 PM
Unknown Object (File)
Sat, Nov 30, 8:55 PM
Unknown Object (File)
Mon, Nov 25, 10:48 AM
Unknown Object (File)
Sun, Nov 24, 9:52 AM
Unknown Object (File)
Nov 22 2024, 9:51 AM
Unknown Object (File)
Nov 21 2024, 5:15 PM
Unknown Object (File)
Nov 15 2024, 2:39 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable