Re: find & replace?
Hi,
>>"timothy" == timothy <timothy@smasher.rs.itd.umich.edu> writes:
timothy> Hi, is there a console utility to find and replace in a file?
timothy> Preferably on which can find & replace from a bunch of files
timothy> as passed by 'ls' or something?
Other have already pointed out sed, which is the forst one
that springs to mind. There are others.
ed
Perl (perl -pli~ -e 's/old/new/g;' *)
awk
Emacs (emacs -batch ....)
manoj
--
Lactomangulation, n.: Manhandling the "open here" spout on a milk
carton so badly that one has to resort to using the "illegal"
side. Rich Hall, "Sniglets"
Manoj Srivastava <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
Reply to: