sed application?

Mike Starke plug-discuss@lists.plug.phoenix.az.us
Thu, 13 Feb 2003 13:03:22 -0500


I have a case where I need to change the value
of a variable in a number of Perl scripts.

How would I take the results of a grep command
and apply a change to it? For instance, if I
issue the command:

'grep -r smtp_addr *'

and get a bunch of results like:

1stfile: $smtp_adrr = "old_value";
2ndfile: $smtp_adrr = "old_value";
3rdfile: $smtp_adrr = "old_value";
4thfile: $smtp_adrr = "old_value";

v/r
-Mike