Re: the Holy Grail of AppleScript lists
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.