From owner-freebsd-questions@FreeBSD.ORG Wed Jan 26 15:43:27 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 B412616A4CE for ; Wed, 26 Jan 2005 15:43:27 +0000 (GMT) Received: from smtp1.wanadoo.fr (smtp1.wanadoo.fr [193.252.22.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B48243D5A for ; Wed, 26 Jan 2005 15:43:27 +0000 (GMT) (envelope-from atkielski.anthony@wanadoo.fr) Received: from me-wanadoo.net (mail.local.net [127.0.0.1]) by mwinf0103.wanadoo.fr (SMTP Server) with ESMTP id E5BDE1F92652 for ; Wed, 26 Jan 2005 16:43:25 +0100 (CET) Received: from pix.atkielski.com (ASt-Lambert-111-2-1-3.w81-50.abo.wanadoo.fr [81.50.80.3]) by mwinf0103.wanadoo.fr (SMTP Server) with ESMTP id CA0E81F9264B for ; Wed, 26 Jan 2005 16:43:25 +0100 (CET) X-ME-UUID: 20050126154325827.CA0E81F9264B@mwinf0103.wanadoo.fr Date: Wed, 26 Jan 2005 16:43:25 +0100 From: Anthony Atkielski X-Priority: 3 (Normal) Message-ID: <1878149195.20050126164325@wanadoo.fr> To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: One-line global string replace in all files with sed (or awk?) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jan 2005 15:43:27 -0000 A few years ago, I'm sure I came across a one-line way of replacing every occurence of one string with another in an entire directory of files (potentially including all subdirectories as well). I think it used sed or awk. Now I can't find it. The examples on the Web are all multiline scripts or programs, but I'm sure I saw a way to do it all on just one line. Can anyone tell me how to do this? -- Anthony