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:24:03 -0400
sort -n sorts numerically; what you get as far as sorting non-numeric remnants after identical numeric keys is essentially arbitrary, so case-sensitivity switches don't apply.
If you want to sort first numerically and then by a text field (whether case-sensitive or not), that's two different sort keys.
This should work:
sort -t ">" -f -k1,1n -k2
Logically, sort -k1,1n -k2f should also work, but apparently -f is not a legal key-specific option in OS X's sort(1).
On Thu, Jul 1, 2010 at 5:01 PM, KOENIG Yvan
<email@hidden> wrote:
Hello
I try to edit this script so that it become 'not case sensitive'.
--[SCRIPT]
set unsortedList to {"12<>azertyuiop", "12<>Bzertyuiop", "12<>Azertyuiop", "10<>sdf"}
set AppleScript's text item delimiters to linefeed
set sortedList to paragraphs of ¬
(do shell script "echo " & quoted form of (unsortedList as string) & "| sort -n")
set AppleScript's text item delimiters to ""
sortedList
--[/SCRIPT]
It seems that the option -n kills the effect of the option -f supposed to make the sort 'not case sensitive'
Thanks in advance.
Yvan KOENIG (VALLAURIS, France) jeudi 1 juillet 2010 23:00:53
_______________________________________________
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
--
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