I occasionally need to sort financial files from mainframes, so I'd love to see flags for packed decimal fields. I have a script that I use to patch up these files into text for sorting, but it would be nice to skip that step.
Also, I don't know whether your n flag means that the sort routine expects binary values in your records, or text strings representing numbers. If it means your records contain binary values, I'd really like to sort a numeric text column in natural order:
unsorted sorted ---------- ---------- xxx1 xxx xxx1 xxx xxx11 xxx xxx 5 xxx xxx 5 xxx xxx 010xxx xxx010 xxx xxx11 xxx
Regarding your comment about gnu sort: I know what you mean. I use it infrequently enough that I can't remember just how to specify what I want, but often enough to wish it was easy to remember. I generally have to sort the file a few times before I can get the switches just right.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re: sort utility key specification
by roboticus
in thread sort utility key specification
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |