Page MenuHomeFreeBSD

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

Authored by ian on Nov 6 2019, 6:00 PM.
Referenced Files
Unknown Object (File)
Tue, May 23, 10:09 PM
Unknown Object (File)
May 2 2023, 8:52 AM
Unknown Object (File)
Apr 12 2023, 11:33 AM
Unknown Object (File)
Mar 31 2023, 8:43 AM
Unknown Object (File)
Mar 18 2023, 3:41 AM
Unknown Object (File)
Mar 2 2023, 4:57 PM
Unknown Object (File)
Feb 16 2023, 8:51 PM
Unknown Object (File)
Feb 16 2023, 8:50 PM



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

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