6

Linux sort second last column

view full story
linux-howto

http://unix.stackexchange.com – I would like know how to sort the second last column ? It has the word "days=" in front of the number. I'm able to get the column with awk '{print $(NF-1)}', but sorting is wrong. 457000 (test2) && (SGD||RMB||HKD||YEN) days=5000 71 37622 (this is || test1)&&(SGD||HKD||RMB) days=630 40010 43944 (this is)&&(SGD||HKD) days=80 102732 79378 (this is||test2)&&(HKD||RMB) days=800 205425 The result I'm looking for is 43944 (this is)&&(SGD||HKD) days=80 102732 37622 (this is || test1)&&(SGD||HKD||RMB) days=63 (HowTos)