• 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: the Holy Grail of AppleScript lists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: the Holy Grail of AppleScript lists


  • Subject: Re: the Holy Grail of AppleScript lists
  • From: Paul Skinner <email@hidden>
  • Date: Wed, 19 Mar 2003 15:16:58 -0500

On Wednesday, March 19, 2003, at 02:20 PM, Paul Berkowitz wrote:

snip

> I wonder what the special case is. I have seen paragraphs wok with
> over 5000
> items occasionally. Maybe it's the shortness (single characters) of the
> items. Try this:
>
> set delim to return
> set l to {"3333333", "aaaaaaa", "CCCCCCC", "ccccccc", "BBBBBBB",
> 2222222,
> "AAAAAAA", 1111111}
> repeat 10 times
> set l to l & l
> end repeat
> set AppleScript's text item delimiters to delim
> set t to text items of (do shell script ("echo '" & l as text) & "' |
> tr '"
> & delim & "' '\n' | sort -f")
>
> --> ERROR: An error of type 255 has occurred.
>
> Yup.
> --
> Paul Berkowitz

Actually this is an 'echo' limitation. Too much data.

set delim to return
set l to {"33333333", "aaaaaaaa", "CCCCCCCC", "cccccccc", "BBBBBBBB",
22222222, "AAAAAAAA", 11111111}
repeat 10 times
set l to l & l
end repeat
set AppleScript's text item delimiters to delim
do shell script ("echo "& l as text)
-->An error of type 255 has occurred.

To show this I created a test file 'tempy' which contains 157211 lines
of text each consisting of 'abcdefghijklmnopqrstuvwxyz'. 4MB!

set delim to return
set t to text items of (do shell script ("cd ~/; cat tempy | tr '" &
delim & "' '\n' | sort -f"))
-->list of 157211 items (30 seconds!)

Paul Skinner
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: the Holy Grail of AppleScript lists
      • From: Christopher Nebel <email@hidden>
References: 
 >Re: the Holy Grail of AppleScript lists (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: RE: Script Editor Faster than App?
  • Next by Date: Re: the Holy Grail of AppleScript lists
  • Previous by thread: Re: the Holy Grail of AppleScript lists
  • Next by thread: Re: the Holy Grail of AppleScript lists
  • Index(es):
    • Date
    • Thread