coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[coreutils] Feature request: uniq -k


From: Raphael Clifford
Subject: [coreutils] Feature request: uniq -k
Date: Fri, 2 Apr 2010 20:22:08 +0100

I am not sure if this the right place to ask, but is it possible to
make a feature request for uniq to add the "-k" option to specify
fields?  Oddly uniq already has such things as

-f, --skip-fields=N
              avoid comparing the first N fields
and

 -s, --skip-chars=N
              avoid comparing the first N characters

but no explicit option to specify which fields should be considered
when doing the comparison.  This would be very useful, for example,
when removing duplicates from time series data (where you are only
worried about consecutive duplicates on certain fields).  The awk
equivalent would be something like

awk '$2$3$4$5 !=  p; {p=$2$3$4$5}'

for using fields 2 to 5 as comparators.

Raphael




reply via email to

[Prev in Thread] Current Thread [Next in Thread]