I have a text file:
$ cat text 542,8,1,418,1 542,9,1,418,1 301,34,1,689070,1 542,9,1,418,1 199,7,1,419,10
I\'d like to sort the file based on
When sorting on a key, you must provide the end of the key as well, otherwise sort uses all following keys as well.
The following should work:
sort -t, -u -k1,1n text