in reply to command lineIn place edit with a filter

perl -pi.bak -e"s#\bGPP\b#Arjun#i;" *.dsp
We're not surrounded, we're in a target-rich environment!

Replies are listed 'Best First'.
Re: Re: command lineIn place edit with a filter
by thesundayman (Novice) on Apr 04, 2003 at 15:40 UTC
    Have to go to n-levels in the directory. This will only work for the current directory.

    By the way, I get the message "Can't open *.dsp: Invalid argument.". Remember this is windows :-(

    Saurabh

      use G;

      Without additional options it'll glob the usual way, if you do it like this

      perl -MG=R -pi.bak -e"s#\bGPP\b#Arjun#i;" *.dsp
      it'll glob recursively.

      P.S.: You can install the module by PPM from http://jenda.krynicky.cz/perl

      Jenda
      Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
         -- Rick Osborne

      Edit by castaway: Closed small tag in signature