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