For example I have some test file and want to sort it by the column values. After
awk -F'[:,]' '{print $16}' test.json
I get next output for the column 16:
123
457
68
11
939
11
345
9
199
13745
Now, when I want to sort it numeric, I use
awk -F'[:,]' '{print $16}' test.json | sort -nk16
but I just get back not nummeric sort...
11
11
123
13745
199
345
457
68
9
939
What is a reason, I thought -n
parameter is enough for the nummeric sort....
sort -n
. There's no 16th column in that output ofawk
sort -nk16 test.json