From owner-freebsd-questions@FreeBSD.ORG Wed Jan 7 07:29:25 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4810816A4CE for ; Wed, 7 Jan 2004 07:29:25 -0800 (PST) Received: from airbus.lido-tech.net (airbus.lido-tech.net [62.89.127.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 669C843D1D for ; Wed, 7 Jan 2004 07:29:23 -0800 (PST) (envelope-from bernard.el-hagin@lido-tech.net) Received: from localhost (localhost.lido-tech.net [127.0.0.1]) by airbus.lido-tech.net (Postfix) with ESMTP id 6343F4AD7C for ; Wed, 7 Jan 2004 16:28:58 +0100 (CET) Received: from airbus.lido-tech.net ([127.0.0.1]) by localhost (airbus.lido-tech.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04158-03 for ; Wed, 7 Jan 2004 16:28:57 +0100 (CET) Received: from lido-tech.net (domino01.lido-tech [192.168.32.82]) by airbus.lido-tech.net (Postfix) with ESMTP id 847604AD74 for ; Wed, 7 Jan 2004 16:28:57 +0100 (CET) Received: from gdndev25.lido-tech ([192.168.38.25]) by lido-tech.net (Lotus Domino Release 5.0.11) with SMTP id 2004010716322241:316102 ; Wed, 7 Jan 2004 16:32:22 +0100 From: Bernard El-Hagin To: freebsd-questions@freebsd.org Date: Wed, 07 Jan 2004 16:26:44 +0100 Message-ID: <549ovv4aj4l3mglt7p08if23pousehjf1m@4ax.com> References: <20040106075951.4910.qmail@www-01.iinet.net.au> <44hdz7rdwk.fsf@be-well.ilk.org> <003e01c3d531$fec960b0$fa65a8c0@ocfl061> In-Reply-To: <003e01c3d531$fec960b0$fa65a8c0@ocfl061> X-Mailer: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on Domino01.lido-tech/Lido-Tech(Release 5.0.11 |July 24, 2002) at 01/07/2004 04:32:22 PM,|July 24, 2002) at 01/07/2004 04:32:23 PM, Serialize complete at 01/07/2004 04:32:23 PM Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Subject: Re: mass word find/replace X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: bernard.el-hagin@lido-tech.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2004 15:29:25 -0000 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