Search Results

Search: Posts Made By: SrinivasTiru
8,726
Posted By pravin27
Try this , sort -t"," -k1,1 -k3,3nr Filename |...
Try this ,
sort -t"," -k1,1 -k3,3nr Filename | awk -F"," '!a[$1]++'
8,726
Posted By rangarasan
awk
Hi,
Try this one,

awk 'BEGIN{FS=",";}{if(a[$1]<$3){a[$1]=$3;}}END{for(i in a){print i","a[i];}}' file|sort -t',' -k1,1

if you are using gawk, make you of asort function to sort the array a and...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 10:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy