From owner-freebsd-isp Tue Jan 7 17:20:46 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id RAA00991 for isp-outgoing; Tue, 7 Jan 1997 17:20:46 -0800 (PST) Received: from bitbucket.edmweb.com (bitbucket.edmweb.com [204.244.190.9]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id RAA00972 for ; Tue, 7 Jan 1997 17:20:42 -0800 (PST) Received: from localhost (steve@localhost) by bitbucket.edmweb.com (8.6.12/8.6.12) with SMTP id RAA01681; Tue, 7 Jan 1997 17:19:45 -0800 X-Authentication-Warning: bitbucket.edmweb.com: steve owned process doing -bs Date: Tue, 7 Jan 1997 17:19:42 -0800 (PST) From: Steve Reid To: rg@gds.de cc: freebsd-isp@freebsd.org Subject: Re: grep & replace In-Reply-To: <199701080055.BAA03700@gds.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-isp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > I have to replace one special word in about one hundred files. The > expression could be several time in some files. > Is there something like grep that would not only find these > expressions but also replace them by the new one? Try sed. You'll probably get more info from looking at shell scripts that use sed (look in /etc) than from the sed man page. If you need to do really complex stuff, you might prefer Perl.