• 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: parsing a large text file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parsing a large text file


  • Subject: Re: parsing a large text file
  • From: email@hidden
  • Date: Mon, 10 Jul 2006 08:05:06 -0600

Thanks for the input.
I ended up using:
--
set theFile to choose file with prompt "Please select the file to read from..."
set inFile to open for access theFile
set theFile to choose file name with prompt "Save transformed data..."
set outFile to open for access theFile with write permission
repeat
try
set dataLine to read inFile until return
on error
close access inFile
close access outFile
return
end try
-- do what you want with the line of data
write dataLine to outFile
end repeat
--
It worked great for the intended purpose.


The file I'm parsing is indeed 32 MB.

Although I'd like to use shell scripting, I feel overwhelmed just getting AppleScript to work.

Thanks again.
--
DOS

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Attivating the display dialog window
  • Next by Date: Re: Attivating the display dialog window
  • Previous by thread: Re: parsing a large text file
  • Next by thread: UI scripting "Show Infos"
  • Index(es):
    • Date
    • Thread