James Edward Gray II wrote: > > On Mar 10, 2004, at 12:56 PM, Mr Mojo wrote: > > > > I have a text file (texst1.txt) that reads: > > > > The quick brown fox jumped over the lazy dog. > > > > I would like to replace the word fox with coyote. Is there an > > easier/simpler/cooler way to do this? > > perl -pi -e 's/fox/coyote' text_file_name_here.txt
Note that if you are running Windows the -i switch will not work correctly without a value. Also the closing '/' is missing. :-) John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>