Re: Sort not case sensitive
Re: Sort not case sensitive
- Subject: Re: Sort not case sensitive
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 1 Jul 2010 17:33:13 -0400
Except that doesn't work, at least not OMM - see my earlier reply. It seems -f as a key-specific flag is not honored; I have to specify it as a global flag instead of a key-specific one.
& "| sort -t '>' -f -k1n -k2"
Whether to use '<' or '>' as the delimiter is arbitrary; with -t<, the ">" is part of the second field that it does the secondary sort on, but since all of them have it, it doesn't affect the order. With -t>, the "<" is part of the numeric field that it does the primary sort on, but again since it's not a digit, it doesn't affect things either. It is unfortunate that sort only works with single-character delimiters, but it doesn't hurt in this case.
Also, Yvan, if the example is representative in that all your strings have the same number of digits in the numeric part, you don't have to do a numeric sort at all; a collation-order sort will do the right thing, and you can just do a simple "sort -f".
On Thu, Jul 1, 2010 at 5:26 PM, Axel Luttgens
<email@hidden> wrote:
Le 1 juil. 2010 à 23:18:00, Axel Luttgens a écrit :
> [...]
>
> & "| sort -n -t '<' -k2f"
>
> [...]
Sorry, I meant:
& "| sort -t '<' -k1n -k2f"
:-(
--
Mark J. Reed <
email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden