Date: Wed, 7 Jan 2004 19:50:33 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: questions@freebsd.org Subject: Re: mass word find/replace Message-ID: <20040107195033.GE89134@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20040107153034.GA98351@Uruk-Hai.Sanitarium.mine.nu> References: <20040106075951.4910.qmail@www-01.iinet.net.au> <44hdz7rdwk.fsf@be-well.ilk.org> <003e01c3d531$fec960b0$fa65a8c0@ocfl061> <20040107153034.GA98351@Uruk-Hai.Sanitarium.mine.nu>
next in thread | previous in thread | raw e-mail | index | archive | help
--Zrag5V6pnZGjLKiw
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Wed, Jan 07, 2004 at 04:30:34PM +0100, Bj=F6rn Andersson wrote:
> sed(1) should be able do the trick.
>=20
> sed -e /pn_/s//nuke_/g *
>=20
> The above command should replace all pn_ to nuke_ in all files in the dir=
ectory 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
--=20
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
--Zrag5V6pnZGjLKiw
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)
iD8DBQE//GMJdtESqEQa7a0RAl2pAJ4om1FF/MCd6Y3ZUzHQKSrJjQTBbgCglQWU
me0kdTmb3z6jnZIy/1kRt5c=
=Z0xs
-----END PGP SIGNATURE-----
--Zrag5V6pnZGjLKiw--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040107195033.GE89134>
