History log of /freebsd-current/usr.bin/uniq/uniq.1
Revision Date Author Comments
# 11715600 12-Jan-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

uniq: Fix interactive use.

Output a line as soon as it is possible to determine that it will have
to be output. For the basic case, this means output each line as it is
read unless it is identical to the previous one. For the -d case, it
means output the first instance as soon as the second is read, unless
the -c option was also given. The -D and -u cases were already fine.

Add test cases for interactive use with no options and with -d.

Explicitly ignore -d when -D is also specified.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: rew, kevans
Differential Revision: https://reviews.freebsd.org/D43382


# bdcbfde3 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# b2c76c41 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line nroff pattern

Remove /^\.\\"\s*\$FreeBSD\$$\n/


# e6e3cf55 07-Jun-2020 Benedict Reuschling <bcr@FreeBSD.org>

Add EXAMPLES to cover all flags except -f since it is analogous to -s.

An EXAMPLE section was adding with some basic examples that show the use of
uniq(1) with various flags.

Submitted by: fernape@
Approved by: bcr@
MFC after: 4 days
Relnotes: yes (EXAMPLE section for uniq(1))
Differential Revision: https://reviews.freebsd.org/D25149


# d9371717 15-Dec-2019 Ian Lepore <ian@FreeBSD.org>

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


# a597327b 01-May-2018 Kyle Evans <kevans@FreeBSD.org>

uniq(1): Add some long options

These match GNU uniq(1) where appropriate for compatibility's sake.

While here, re-sort options alphabetically by the short-option.

MFC after: 1 month


# a520574d 15-May-2017 Ed Maste <emaste@FreeBSD.org>

uniq: allow -c to be used with -d or -u

Bring in some bits from NetBSD and lift the restriction in uniq(1) that
-c cannot be used with the -d and -u options. This restriction seems
unnecessary and is supported at least by GNU, OpenBSD, and NetBSD. Lift
the restriction and simplify the show() logic a little bit to maintain
functionality when -c is provided with -d/-u.

Also with this change, -d and -u are now actually a mutually exclusive,
albeit valid, combination. Given that they both indicate opposite
behavior, uniq(1) will no longer output anything if both -d and -u are
supplied. This is in line with NetBSD as well as GNU.

Adjust the man page and usage() to reflect that -c is its own standalone
option.

PR: 200553
Submitted by: Kyle Evans <kevans91@ksu.edu>
Reviewed by: cem, emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D10694


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# da52b4ca 11-Dec-2010 Joel Dahl <joel@FreeBSD.org>

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 37a33496 06-Feb-2010 Jaakko Heinonen <jh@FreeBSD.org>

MFC r200632:

The input line length limit mentioned on the manual page was removed by
r176119.


# 698f9263 17-Dec-2009 Jaakko Heinonen <jh@FreeBSD.org>

The input line length limit mentioned on the manual page was removed by
r176119.

Approved by: trasz (mentor)


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 1833a7ea 15-Jan-2007 Giorgos Keramidas <keramida@FreeBSD.org>

Document that uniq(1) limits input line length to LINE_MAX characters.

PR: docs/107578
Submitted by: Jan Schaumann, jschauma.at.netmeister.org
MFC after: 3 days


# a866e170 17-Jan-2005 Ruslan Ermilov <ru@FreeBSD.org>

Added the EXIT STATUS section where appropriate.


# 3fead394 02-Jul-2004 Tim J. Robbins <tjr@FreeBSD.org>

Add support for multibyte characters.


# 6a3e8b0a 02-Jul-2004 Ruslan Ermilov <ru@FreeBSD.org>

Mechanically kill hard sentence breaks.


# e90e39d9 24-Jun-2004 Tim J. Robbins <tjr@FreeBSD.org>

Document the fact that uniq(1) does not recognize multibyte characters.


# 058d2686 11-Apr-2003 Tim J. Robbins <tjr@FreeBSD.org>

Mention the environment variables that affect the execution of uniq.
Of particular interest is the fact that LC_COLLATE affects how uniq
determines whether lines are equal. This was the subject of a fairly heated
debate a year or so ago, and it turns out that the current behaviour is
correct and that the standard contained an error.

Now that the standard has been corrected by Cor. 1-2002, refer to 1003.1-2001
instead of the 1992 edition in the Standards section.


# 06e482e6 26-Nov-2002 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: markup polishing.

Approved by: re


# fa745288 05-Jul-2002 Tim J. Robbins <tjr@FreeBSD.org>

Correct the History section; uniq(1) appeared at least as early as V3.
Move the section to after Standards.


# 898e5fd3 05-Jul-2002 Tim J. Robbins <tjr@FreeBSD.org>

Remove redundant description of input_file and output_file arguments.


# 6fc8ba94 10-Jun-2002 Juli Mallett <jmallett@FreeBSD.org>

Note that this appeared at least as early as PWB UNIX.

Use the literal string 'PWB UNIX', as we still have no .At macro for it.


# 38b1ff46 29-May-2002 Tim J. Robbins <tjr@FreeBSD.org>

Accept an input file name of "-" to mean standard input, as required by
P1003.2.


# e223a771 24-May-2002 Tom Rhodes <trhodes@FreeBSD.org>

Add the word ``fields'' to the description, and change an instance from
fields to num in the SYNOPSIS

Noticed by: keramida


# 69cc776c 21-May-2002 Tom Rhodes <trhodes@FreeBSD.org>

Reword a small part of the uniq(1) manual page to help reduce word
duplication (ie: fields fields).

PR: 38161
Reviewed by: keramida
MFC after: 3 days


# d628d776 15-Aug-2001 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: utilize the new .Ex macro.


# dbb9d8f8 26-Mar-2000 Philippe Charnier <charnier@FreeBSD.org>

Add DIAGNOSTICS section name


# c3aac50f 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# faaf9d7f 14-Mar-1999 Bill Fumerola <billf@FreeBSD.org>

Grammar nits, double negatives

PR: docs/10491
Submitted By: Tom Hukins <tom@eborcom.com>


# 2ca7dc15 07-Sep-1997 Joerg Wunsch <joerg@FreeBSD.org>

Teach comm(1) and uniq(1) about an option for case-insensitive work.

PR: 3042
Submitted by: graphix@iastate.edu (Kent Vander Velden)


# 213915d4 21-Aug-1997 Philippe Charnier <charnier@FreeBSD.org>

Use err(3) instead of local redefinition.


# 9b50d902 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources