The key is first field i want only uniq record for the first field in file.
I want the output as
or output as
Appreciate help on this
The key is first field i want only uniq record for the first field in file.
I want the output as
or output as
Appreciate help on this
one way:
awk -F, '!arr[$0]++' inputfile > outputfile
awk -F "," '{a[$1]=$2","$3;next}END{for (i in a)print i,a}' OFS="," FILE
or
sort -t "," -k 1,1 -u file
cheers,
Devaraj Takhellambam
Thankyou
devtakh and jim mcnamara
try
awk -F, 'arr[$1]++==0{print $0} ' file