Search Results

Search: Posts Made By: sayami00
1,500
Posted By RudiC
Try also awk -F"|" '{if ($3 > MX[$1 FS $2 FS...
Try also
awk -F"|" '{if ($3 > MX[$1 FS $2 FS $4]) MX[$1 FS $2 FS $4] = $3} END {for (m in MX) print m FS MX[m]}' file
0221|09|ccc|33.68
0221|09|aaa|44.33
0221|09|bbb|44.53

OR, if you want to...
1,500
Posted By raj_saini20
Try this Third field move to last, if required in...
Try this Third field move to last, if required in order can be done

awk -F"|" '(!a[$1"|"$2"|"$4]){a[$1"|"$2"|"$4]=$3;next}{if(a[$1"|"$2"|"$4] < $3){a[$1"|"$2"|"$4]=$3}}END{for( i in a) { print...
Showing results 1 to 2 of 2

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