• 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: Reversing the lines in a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reversing the lines in a file


  • Subject: Re: Reversing the lines in a file
  • From: has <email@hidden>
  • Date: Fri, 10 May 2002 19:36:34 +0100

Paul Skinner wrote:

>Why do you want to go and do all that thrashing around?

Oh hey, I didn't think I was *that* thrashy. :)

I guess you could take out the error trapping, and the droplet stuff, and
maybe one or two other bits n pieces if you wanted... nope, still not as
short as yours though.

>The version I posted does none of that and reads, reverses, and writes a
>text file with >25000 lines in under 10 seconds.

<sound of me scraping through digests>

Ah, found it:

read file ((choose file) as text) as list using delimiter return

Very neat. I never realised you could do that. [Duh is me.]


That said, when I tried yours on an 800KB, 25000-line text file, it took
102 secs to process. My old thrasher took just 1.1 secs Maybe something in
the 'read file' command OMM [1]? YMMV.

has

[1] G3/300, OS8.6, AS1.3.7

--
http://www.barple.connectfree.co.uk/ -- The Little Page of Beta AppleScripts
_______________________________________________
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.

  • Prev by Date: Re: Closing TCP/IP control panel and BUG in 'path to'
  • Next by Date: Changing desktop pictures and alert sounds
  • Previous by thread: Re: Reversing the lines in a file
  • Next by thread: Scripting OmniGraffle
  • Index(es):
    • Date
    • Thread