Re: Modifying text in a large file
Re: Modifying text in a large file
- Subject: Re: Modifying text in a large file
- From: Steve Mills <email@hidden>
- Date: Mon, 20 Oct 2003 09:35:15 -0500
On Monday, Oct 20, 2003, at 08:27 US/Central, christian vick wrote:
I want to search a string and then replace the entire line with another
string (or delete the line). This in a large text file (50 MB). If I
use
'read file' the script errors with 'out of memory', so vanilla AS is
not an
option here. I've searched Terminal 'apropos search'/'apropos
replace', but
didn't find anything useful. Does someone know how to do it via command
line, so i can use 'do shell script'...?
Why not search only a hunk of the file at a time, say 32k or something
like that? Read 32k, search it, then read 32k again except you'll need
to move the file position back (length of searchString - 1), repeat.
Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
_______________________________________________
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.