Re: Modifying a file in place perl -i

2003-09-05 Thread Randal L. Schwartz
> "Raj" == Raj Karadakal <[EMAIL PROTECTED]> writes: Raj> Hi, Raj>I am trying to modify some file sin place usinh the -i switch of Raj> perl. In each of the files however I need to replace certain strings with Raj> file name it self. Raj> When I try the following command Raj> perl -i.orig

Re: Modifying a file in place perl -i

2003-09-05 Thread Paul Johnson
Raj (Basavaraj) Karadakal said: > Hi, > I am trying to modify some file sin place usinh the -i switch of > perl. In each of the files however I need to replace certain strings with > file name it self. > > When I try the following command > perl -i.orig -pe 's//$0/' `ls -1` > > Will replace

Modifying a file in place perl -i

2003-09-05 Thread Raj (Basavaraj) Karadakal
Hi, I am trying to modify some file sin place usinh the -i switch of perl. In each of the files however I need to replace certain strings with file name it self. When I try the following command perl -i.orig -pe 's//$0/' `ls -1` Will replace '' with '-e' in all the files How can I get th