From owner-freebsd-questions@FreeBSD.ORG Fri May 13 09:29:06 2005 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 28D7016A4CE for ; Fri, 13 May 2005 09:29:06 +0000 (GMT) Received: from webmail-outgoing.us4.outblaze.com (webmail-outgoing.us4.outblaze.com [205.158.62.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00D9843D5D for ; Fri, 13 May 2005 09:29:06 +0000 (GMT) (envelope-from fteg@london.com) Received: from unknown (unknown [192.168.9.180])E5C1A18001AD for ; Fri, 13 May 2005 09:29:05 +0000 (GMT) X-OB-Received: from unknown (205.158.62.49) by wfilter.us4.outblaze.com; 13 May 2005 09:29:05 -0000 Received: by ws1-1.us4.outblaze.com (Postfix, from userid 1001) id D003E4BEAD; Fri, 13 May 2005 09:29:05 +0000 (GMT) Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 2.117 (F2.6; A1.17; B2.12; Q2.03) Received: from [213.187.181.70] by ws1-1.us4.outblaze.com with http for fteg@london.com; Fri, 13 May 2005 04:29:05 -0500 X-Mailer: mail.com webmail From: "Fafa Hafiz Krantz" To: questions@freebsd.org Date: Fri, 13 May 2005 04:29:05 -0500 X-Originating-Ip: 213.187.181.70 X-Originating-Server: ws1-1.us4.outblaze.com Message-Id: <20050513092905.D003E4BEAD@ws1-1.us4.outblaze.com> Subject: How to replace words in all files? 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: Fri, 13 May 2005 09:29:06 -0000 Hello! I have a bunch of configuration files which all contain the word, or the reference to, my dysfunctional network interface lnc0. I used to have this simple script -- to replace a word in all ASCII files containing it -- with another word. In this case, I need to replace the string `lnc0' with `rl0' in all my configuration files. And is it possible having this script tell me what files it modified? I promise I'll write it down this time :) And be generous on handing it back out to the society! -- Fafa Hafiz Krantz Research Designer @ http://www.home.no/barbershop Enlightened @ http://www.home.no/barbershop/smart/sharon.pdf --=20 ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm