Remove duplicate values and create unique records.
muniq [k=] [i=] [o=] [-nfn] [-nfno] [-x] [-q] [--help] [--version]
k= Specify the field name (s) as the unique identifier of the records.
Remove duplicate records in the date field.
$ more dat1.csv date,customer 20081201,A 20081202,A 20081202,B 20081202,B 20081203,C $ muniq k=date i=dat1.csv o=rsl1.csv #END# kguniq i=dat1.csv k=date o=rsl1.csv $ more rsl1.csv date%0,customer 20081201,A 20081202,B 20081203,C
Remove duplicate records based on unique values in date and customer field.
$ muniq k=date,customer i=dat1.csv o=rsl2.csv #END# kguniq i=dat1.csv k=date,customer o=rsl2.csv $ more rsl2.csv date%0,customer%1 20081201,A 20081202,A 20081202,B 20081203,C
mbest : Use mbest command to select the line number for records with the same key.