I am dropping a delimited file to disk in order to leverage the UNIX sort command rather than the Sort plugin as it can be orders of magnitude faster. It's fairly simply when sorting on character fields, as by default it does a string sort. I'm wondering if there is 'shorter' syntax than the only way I've found so far when sorting multiple numeric keys.
Abbreviated Example: the first 9 fields in the file are numeric fields and I need to sort on them in order. I thought I could do something simple, like one of the following:
Code: Select all
sort -n -k 1,9
sort -k 1,9n
sort -k 1n,9n
Code: Select all
sort -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n