Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Jan 2004 16:26:44 +0100
From:      Bernard El-Hagin <bernard.el-hagin@lido-tech.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: mass  word find/replace
Message-ID:  <549ovv4aj4l3mglt7p08if23pousehjf1m@4ax.com>
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
Mark wrote:

>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


   perl -i.bak -pe 's/pn_/nuke_/g' /input/file(s)


The old file(s) will be saved with the extension .bak.


--=20
Cheers,
Bernard



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