Mime-Version: |
1.0 (Apple Message framework v752.2) |
Content-Type: |
text/plain; charset=US-ASCII; delsp=yes; format=flowed |
Date: |
Wed, 22 Nov 2006 13:06:55 -0500 |
Reply-To: |
|
Subject: |
|
From: |
|
In-Reply-To: |
|
Content-Transfer-Encoding: |
7bit |
Sender: |
|
Parts/Attachments: |
|
|
On Nov 22, 2006, at 12:51 PM, Bob R. wrote:
> Is there a scripting addition freeware that will sort strings of
> text in alphabetical order, for
> OSX?
>
> Thanks!
>
there is the shell command sort
set foo to {"a", "b", "d", "g", "aa", "bb", "c", "cc", "e", "f"}
set AppleScript's text item delimiters to return
set lun to open for access ("/tmp/junk.txt" as POSIX file) with write
permission
write (foo as text) to lun
close lun
set outtext to do shell script "sort /tmp/junk.txt"
every text item of outtext
|
|
|