I have records with unpadded numbers I want to sort on. I can assume
some maximum length and go character by character:
... | sort -4 -3 -2 -1 | ...
but this gets pretty cumbersome when I have to pick it out of the middle
of the record (in my real-life case at hand, I'm sorting REXXVARS TOLOAD
I may be a little dense, but how does this
>
> ... | sort -4 -3 -2 -1 | ...
>
Differ from ... | sort -4;-1 |...?
Or this:
>
> ... | sort ws . substr -4 of substr w1 of af 1
> substr -3 of substr w1 of af 1
> substr -2 of substr w1 of af 1
>
On: Thu, Feb 04, 2010 at 06:17:58PM -0500,Glenn Knickerbocker Wrote:
} I have records with unpadded numbers I want to sort on. I can assume
} some maximum length and go character by character:
[...]
} Or, again assuming some maximum length, I can stick a padded copy of the
} number on the left:
On Thu, 4 Feb 2010 16:21:23 -0800, Richard Schuh wrote:
>I may be a little dense, but how does this
>>
>> ... | sort -4 -3 -2 -1 | ...
>>
>Differ from ... | sort -4;-1 |...?
Consider a record shorter than 4 characters. -4;-1 starts with the first
character of the record. -4 -3 -2 -1 starts