Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#perl -ne 's/text/newtext/g' /path/to/file
#perl -ne 's/text/newtext/g' /path/to/file > /path/to/newfile
i an trying to edit this instance in several config files, so I would rather edit the file directly (after copying, of course).
Thanks!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: simple text substitution.
by rev_1318 (Chaplain) on Dec 15, 2004 at 15:19 UTC | |
|
Re: simple text substitution.
by gellyfish (Monsignor) on Dec 15, 2004 at 15:13 UTC | |
|
Re: simple text substitution.
by sauoq (Abbot) on Dec 15, 2004 at 17:42 UTC |