[svlug] edit a 1GB file

Rufoo rufoo2001 at yahoo.com
Mon Mar 31 20:28:50 PST 2003


--- William R Ward <bill at wards.net> wrote:
> 
> The MS-DOS filesystem doesn't support in-place edit
> without backup, as
> the error message said.  So you have to specify a
> backup extension
> after the -i otpion.  Try this instead:
> 
> perl -pi.bak -e 's/record/hello/g'
> 
> Now you will have a file x.txt.bak (NOT x.bak) that
> contains the
> original version, and x.txt contains the updated
> version.


Hmm, ok. But why does Perl need a backup when it is
anyway doing it the sed/shell/mv way? To edit a 1G
file this process is going to use 3G diskspace. If
this is MS-DOS specific, it is not clear why it
mandates a backup.

Thanks
rf

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://platinum.yahoo.com



More information about the svlug mailing list