[wplug] Find and Replace

Brian Medley bpmedley at 4321.tv
Fri Nov 15 07:59:45 EST 2002


On Fri, Nov 15, 2002 at 05:27:13AM -0500, J Aaron Farr wrote:

> What I'm want is a simple script that will do a find and replace over a
> number of files.  Specifically I've got a bunch of FORTRAN files and I
> want to easily change a variable declaration like "N=10" to "N=20".  So
> assuming I have all the files I want to change in my working directory,
> then I should be able to run some command like:
> 
> replace.sh *.for

perl -pi -e 's#N=10#N=20#g' tiny.as

-- 
~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~=-., \|/  (___)  \|/ _,.-=~'`^`
                          Brian Medley         @~./'O o`\.~@
"Knowledge is Power" brian.medley at verizon.net /__( \___/ )__\  *PPPFFBT!*
  -- Francis Bacon                               `\__`U_/'
 _,.-=~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~= <____|'  ^^`'~=-.,__,.-=
~`'^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-==--^'~=-.,__,.-=~'`^`



More information about the wplug mailing list