• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: sort with do Shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sort with do Shell script


  • Subject: Re: sort with do Shell script
  • From: Yvan KOENIG <email@hidden>
  • Date: Tue, 4 May 2010 22:36:28 +0200


Le 4 mai 2010 à 22:09, Mark J. Reed a écrit :

The list is too long for the shell command line - it's the echo that's failing, before it ever gets to sort.  Try this: 

do shell script "sort -n -u <<EOF" & return & (unsortedList as text) & return & "EOF"

If one of the elements of the list might be "EOF", pick a different string for the sentinel...

Thanks.

With EOF same error.

As 10.4 accept ASCII character


I defined the variable sentinel
and edited the instruction as :

do shell script "sort -n -u <<" & sentinel & return & (unsortedList as text) & return & sentinel

I tried with 
set sentinel to ASCII character (1)
…
set sentinel to ASCII character (7)

and always got the same result.
As there is no Unicode character, I will try to import the text in an AppleWorks spreadsheet.
Numbers is desesperately slow with such a list.
15 minutes aren't sufficient and after that my patience is gone.

Yvan KOENIG (VALLAURIS, France) mardi 4 mai 2010 22:36:18


 _______________________________________________
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

References: 
 >sort with do Shell script (From: Yvan KOENIG <email@hidden>)
 >Re: sort with do Shell script (From: Yvan KOENIG <email@hidden>)
 >Re: sort with do Shell script (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: sort with do Shell script
  • Next by Date: Rep: sort with do Shell script
  • Previous by thread: Re: sort with do Shell script
  • Next by thread: Rep: sort with do Shell script
  • Index(es):
    • Date
    • Thread