From owner-freebsd-questions@FreeBSD.ORG Wed Jan 7 07:30:33 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 468B116A4CE for ; Wed, 7 Jan 2004 07:30:33 -0800 (PST) Received: from Uruk-Hai.Sanitarium.mine.nu (h14n2fls35o917.telia.com [217.211.25.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE3DE43D67 for ; Wed, 7 Jan 2004 07:30:27 -0800 (PST) (envelope-from gaqzi@Uruk-Hai.Sanitarium.mine.nu) Received: by Uruk-Hai.Sanitarium.mine.nu (Postfix, from userid 1001) id A845865F; Wed, 7 Jan 2004 16:30:34 +0100 (CET) Date: Wed, 7 Jan 2004 16:30:34 +0100 From: =?iso-8859-1?Q?Bj=F6rn?= Andersson To: questions@freebsd.org Message-ID: <20040107153034.GA98351@Uruk-Hai.Sanitarium.mine.nu> Mail-Followup-To: questions@freebsd.org References: <20040106075951.4910.qmail@www-01.iinet.net.au> <44hdz7rdwk.fsf@be-well.ilk.org> <003e01c3d531$fec960b0$fa65a8c0@ocfl061> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <003e01c3d531$fec960b0$fa65a8c0@ocfl061> User-Agent: Mutt/1.4.1i Subject: Re: mass word find/replace X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2004 15:30:33 -0000 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"