> -----Original Message-----
> From: Shawn H. Corey [mailto:shawnhco...@gmail.com] 
> Sent: Monday, August 24, 2009 11:00
> To: Tony Esposito
> Cc: Beginners Perl
> Subject: Re: one liner in Windows to replace string
> 
> Tony Esposito wrote:
> > perl -p -i.bak -e 's/CONSTANT/VARIABLE/' C:\test.txt
> > 
> > Trying to replace a string with this one line perl ... in 
> Windows it does not seem to work ...
> > 
> > File test.txt contents is ...
> > 
> > CONSTANT 100
> > CONSTANT 200
> > 
> > nothing changes ... acts as if it does not 'see' the 
> CONSTANT string.
> > 
> > Help because it looks like it should work !!!
> 
> Windows does not work with single quotes:
        I ran under windows with what Tony sent, both the cmd and a korn
shell and both worked and updated as expected..

         If you have any questions and/or problems, please let me know.
         Thanks.
 
Wags ;)
David R. Wagner
Senior Programmer Analyst
FedEx Freight Systems
1.719.484.2097 Tel
1.719.484.2419 Fax
1.408.623.5963 Cell
http://fedex.com/us 


> 
> perl -p -i.bak -e "s/CONSTANT/VARIABLE/" C:\test.txt
> 
> 
> -- 
> Just my 0.00000002 million dollars worth,
>    Shawn
> 
> Programming is as much about organization and communication
> as it is about coding.
> 
> I like Perl; it's the only language where you can bless your
> thingy.
> 
> -- 
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
> 
> 
> 

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to