mass word find/replace

Matthew Seaman m.seaman at infracaninophile.co.uk
Wed Jan 7 11:50:39 PST 2004


On Wed, Jan 07, 2004 at 04:30:34PM +0100, Björn Andersson wrote:
> sed(1) should be able do the trick.
> 
> sed -e /pn_/s//nuke_/g *
> 
> The above command should replace all pn_ to nuke_ in all files in the directory you run the command.

Except that will print the result to stdout -- I suspect that the OP
would find an in-place edit more useful, like so:

   sed -i.bak -e 's/pn_/nuke_/g' filenames

(Or any of the other responses in this thread.)

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040107/e11dd4d6/attachment.bin


More information about the freebsd-questions mailing list