From owner-freebsd-questions@FreeBSD.ORG Mon Feb 14 22:34:41 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9947F106566C for ; Mon, 14 Feb 2011 22:34:41 +0000 (UTC) (envelope-from jacks@sage-american.com) Received: from mail.sagedata.net (mail.sagedata.net [38.106.15.121]) by mx1.freebsd.org (Postfix) with ESMTP id 760BE8FC16 for ; Mon, 14 Feb 2011 22:34:41 +0000 (UTC) Received: from SAGEPLACE (sageweb.net [65.68.247.73]) by mail.sagedata.net (8.14.4/8.14.4) with SMTP id p1EMYeqU025820 for ; Mon, 14 Feb 2011 16:34:40 -0600 (CST) (envelope-from jacks@sage-american.com) X-Authentication-Warning: mail.sagedata.net: Host sageweb.net [65.68.247.73] claimed to be SAGEPLACE Message-Id: <3.0.1.32.20110214163437.019167e0@sage-american.com> X-Sender: jacks@sage-american.com X-Mailer: Windows Eudora Pro Version 3.0.1 (32) Date: Mon, 14 Feb 2011 16:34:37 -0600 To: freebsd-questions@freebsd.org From: "Jack L. Stone" Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Greylist: Message whitelisted by Sendmail access database, not delayed by milter-greylist-4.2.6 (mail.sagedata.net [38.106.15.121]); Mon, 14 Feb 2011 16:34:40 -0600 (CST) X-Scanned-By: milter-spamc/1.15.388 (mail.sagedata.net [38.106.15.121]); Mon, 14 Feb 2011 16:34:40 -0600 X-Spam-Status: NO, hits=-10.00 required=4.50 X-Spam-Report: Content analysis details: (-10.0 points, 4.5 required) | | pts rule name description | ---- ---------------------- -------------------------------------------------- | -0.0 SHORTCIRCUIT Not all rules were run, due to a shortcircuited rule | -10 ALL_TRUSTED Passed through trusted hosts only via SMTP | Subject: script help X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2011 22:34:41 -0000 Hello folks: No doubt this will be easy for those with scritping abilities. I have a gazillion files by the same name and each contains the same line requiring the same change. But the problem is that they are in many different directories on a server with numerous domains. While I could handle the change using a single directory within my abilities, I'm unsure how to do a search and replace throughout the many domains and their directories. Don't want to mess up. Here's what I'm trying to do: # find all of the same filenames (copyright.htm) and then replace the year 2010 with 2011 in each file. Once I have a working script, I should be able to add it as a cron job to run on the first day of each new year. Any help appreciated. Thanks! Jack (^_^) Happy trails, Jack L. Stone System Admin Sage-american