Search Results

Search: Posts Made By: DevendraG
6,991
Posted By Chubler_XL
Use something like this, using and array named...
Use something like this, using and array named C[] to keep track of your counter.

sort -t\; -k1,1 -k2,2r -k4,4r infile | awk -F\; '!($1$2 in A) { print $0 ";Try-" ++C[$1]; A[$1$2] }'
6,991
Posted By Chubler_XL
Sorry, should have checked my sort parameters the...
Sorry, should have checked my sort parameters the 4th field was supposed to be sorted in descending order to do the sort needs the r flag (not d) so your correct answers are:
sort -t\; -k1,1 -k4,4r...
Showing results 1 to 2 of 2

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