sed application?

Góra strony
Załączniki:
Wiadomość jako email
+ (text/plain)
Delete this message
Reply to this message
Autor: Mike Starke
Data:  
Temat: sed application?
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