• 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
Rep: sort with do Shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rep: sort with do Shell script


  • Subject: Rep: sort with do Shell script
  • From: Yvan KOENIG <email@hidden>
  • Date: Tue, 4 May 2010 23:07:05 +0200

Le 4 mai 2010 à 22:36, Yvan KOENIG a écrit :


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.

Done

With AppleWorks plus one formula, I was able to sort and drop duplicates.

The coelacanthus is well and alive ;-)

Yvan KOENIG (VALLAURIS, France) mardi 4 mai 2010 22:47:52


 _______________________________________________
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

  • Follow-Ups:
    • Re: Rep: sort with do Shell script
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: Re: sort with do Shell script
  • Next by Date: Sortin an alias list by path
  • Previous by thread: Re: sort with do Shell script
  • Next by thread: Re: Rep: sort with do Shell script
  • Index(es):
    • Date
    • Thread