From owner-freebsd-questions Wed Nov 11 09:26:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA10284 for freebsd-questions-outgoing; Wed, 11 Nov 1998 09:26:50 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mailman.ghg.net (mailman.ghg.net [206.29.116.30]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA10272 for ; Wed, 11 Nov 1998 09:26:41 -0800 (PST) (envelope-from elroy@ghgcorp.com) Received: from ghgcorp.com (IDENT:jwick@max6-74.ghg.net [206.66.110.74]) by mailman.ghg.net (8.9.1/8.9.1/GHG 1.2) with ESMTP id LAA22259; Wed, 11 Nov 1998 11:13:16 -0600 (CST) Message-ID: <3649C8B2.EF33DBCC@ghgcorp.com> Date: Wed, 11 Nov 1998 11:26:10 -0600 From: mark X-Mailer: Mozilla 4.06 [en] (X11; I; Linux 2.0.35 i686) MIME-Version: 1.0 To: "Alain G. Fabry" CC: freebsd-questions@FreeBSD.ORG Subject: Re: find and replace within files. References: <037401be0d96$58d82b90$5531d5c6@earth.coserve.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG check out sed. at least if I understand what you are asking. it can do that, although technically it is a Stream EDitor (thus the name). I have a feeling that this is not the preferred solution for you, but it is possible. markAlain G. Fabry wrote: > Is there any way in FreeBSD that I can search in files for certain lines and > replace them with something else? > f.e. search for Name and replace with Last_Name > This needs to be done thruogh a whole directory tree. > Can you refer me to a command which will do this? > Thanks, > > Alain > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message