Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jan 2004 16:30:34 +0100
From:      =?iso-8859-1?Q?Bj=F6rn?= Andersson <gaqzi@sanitarium.mine.nu>
To:        questions@freebsd.org
Subject:   Re: mass  word find/replace
Message-ID:  <20040107153034.GA98351@Uruk-Hai.Sanitarium.mine.nu>
In-Reply-To: <003e01c3d531$fec960b0$fa65a8c0@ocfl061>
References:  <20040106075951.4910.qmail@www-01.iinet.net.au> <44hdz7rdwk.fsf@be-well.ilk.org> <003e01c3d531$fec960b0$fa65a8c0@ocfl061>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

/Björn

> I am trying to find a way to replace one word in a file
> with another word, like windows wordpad find/replace.
> 
> I need to change pn_ to nuke_ and have a 188000 lines to do it on. ugh
> 
> thanks
> Mark
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040107153034.GA98351>