[PLUG] replacing multipule instances of text

Russell Senior seniorr at aracnet.com
Tue Sep 30 01:46:02 UTC 2003


>>>>> "alex" == alex  <alexlinux at qwest.net> writes:

alex> ex. replace www.foobar.com/RCTC/ with www.RCTC.com/

alex>         My question is..... is there an easy way to do this
alex> other than the obvious highlight and pasting of text?

I am not usually a Perl advocate, but Perl has an option to do
in-place editing (the -i option, I think).  Probably some combination
of that and a perl-ified sed expression sounds like "appropriate
technology" in this case.

On the other hand, appropriate combinations of grep, backtick and sed
at Mr. Shell would also work.


-- 
Russell Senior         ``shtal latta wos ba padre u prett tu nashtonfi
seniorr at aracnet.com      mrlosh''  -- Bashgali Kafir for ``If you have
                         had diarrhoea many days you will surely die.''




More information about the PLUG mailing list