uniqx ver.1.0
date: 2005/02/03
uniq is buggy and too poor
usage:
uniqx [-udcrf] [-k key,key,...] [file]
flags:
-u # print only unique line
-d # print only duplicated line
-c # add count of duplicated line in printing
-r # print last line of duplicated line
-f # field wise comparison (default is column wise comparison)
-k key,key,...
key:
key specifies the fields to compare.
key follows Python like syntax of range.
n:m # the meaning is n,n+1,...,m-1
:m # the meaning is 0:m
n: # the meaning is n to last
: # the meaning is 0 to last
n # the meaning is single field.
n begins with 0
#
# Compatibility to uniq
#
I tried to support syntax of uniq, but it makes the code dirty.
I gave up.
the relation to uniq:
uniq +n
is same as
uniqx -k n:
and
uniq -n
is same as
uniqx -fk n:
#
# BUGS
#
Only tokenize is supported in getting fields.
Field separator option like
-s separator
might be needed for special case.
However the meaning is unclear for me.
Therefore this option is left for future update.
Kenar (Kenji Arisaw)
E-mail: arisawa@aichi-u.ac.jp
|