From owner-freebsd-questions@FreeBSD.ORG Fri Feb 18 17:15: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 E4A3616A4CE for ; Fri, 18 Feb 2005 17:15:27 +0000 (GMT) Received: from mail.qcislands.net (mail.qcislands.net [209.53.238.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DBE543D6A for ; Fri, 18 Feb 2005 17:15:27 +0000 (GMT) (envelope-from fquest@ccstores.com) Received: from [209.53.238.86] (helo=[192.168.1.4]) by mail.qcislands.net with esmtp (Exim 4.44) id 1D2Bix-0006vm-2X; Fri, 18 Feb 2005 09:15:27 -0800 Message-ID: <421622B0.9030600@ccstores.com> Date: Fri, 18 Feb 2005 09:15:28 -0800 From: Jim Pazarena User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-local_scan: locally submitted (86) Subject: need help with script and sed 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, 18 Feb 2005 17:15:28 -0000 I would like to traverse my /users/home tree searching for all regular files and change any lines which read: "/cgi-bin/Count.cgi ..." to: "http://counter.qcislands.net/cgi-bin/Count.cgi ..." I kinda think that a 'find' with an -exec of 'sed' would do it but I'm not sure, and even if it were, I'm not sure of the syntax. Could someone help me please? Thanks! Jim