Rajnikant wrote:
From: Gowri Chandra Sekhar Barla, TLS, Chennai [mailto:[EMAIL PROTECTED]
I facing a problem to substitute extensions of file with " = "
For example:
In a file I have names of some files
a.txt
b.txt
c.txt
I want them to
a=
b=
c=
Try this:
perl -pli -e 's/.txt/=/' input_file
ITYM:
perl -pi -e 's/\.txt$/=/' input_file
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/