sed application?

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Mike Starke
日付:  
題目: 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