For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > July 2004 > Antwort: Edit a file inplace..









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Antwort: Edit a file inplace..
Manfred Beilfuss

2004-07-22, 8:56 pm

Hi,

didn't we have had this question shortly ?
As I, being a perl-newbie still, remember correctly you need
( at least under windows with active state )
a extension for a backup file !

If I write :
perl -pibak -ne "s/ERROR/TRACKED/g" status.log
it works under win2k with active-state-perl

Mit freundlichen Gruessen / Best regards

Manfred Beilfuss




=
=20
Steve.E.Pittman@M =
=20
edstar.net An: James Edward Gray =
II <james@grayproductions.net> =20
Kopie: Perl Beginners <be=
ginners@perl.org>, gohaku =20
19.07.2004 17:56 <gohaku@earthlink.net> =
=20
Thema: Edit a file inplac=
e.. =20
=
=20
=
=20
=
=20








Hi,

I am trying to edit an ASCII file in place?

I tried ?

perl -pi -ne "s/ERROR/TRACKED/g" status.log

and received?

Can't do inplace edit without backup?

Any help is appreciated?

Thanks,

Steve

=



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com