From owner-freebsd-questions Sat Sep 29 20:29:22 2001 Delivered-To: freebsd-questions@freebsd.org Received: from sage-american.com (sage-american.com [216.122.141.44]) by hub.freebsd.org (Postfix) with ESMTP id EEC3537B40A for ; Sat, 29 Sep 2001 20:28:43 -0700 (PDT) Received: from sageone (ppp-208-191-234-160.dialup.crchtx.swbell.net [208.191.234.160]) by sage-american.com (8.9.3/8.9.3) with SMTP id WAA06470 for ; Sat, 29 Sep 2001 22:28:42 -0500 (CDT) Message-Id: <3.0.5.32.20010929222903.03f12c60@mail.sage-american.com> X-Sender: jacks@mail.sage-american.com X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Sat, 29 Sep 2001 22:29:03 -0500 To: freebsd-questions@freebsd.org From: jacks@sage-american.com Subject: Scripting question Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I'm putting the finishing touches on a automated cron script & some of its scripting makes calls on other scripts that contain file names that need to be changed each month, but cannot necessarily use the "date" command to create the variable needed. What I need sounds pretty simple. I need to change a sub-script's string without having to manually open the script file. e.g. change content string "myfile.old" to "myfile.new"... for example: #subscript cp /usr/local/bin/myfile.old /somewhere/else to read cp /usr/local/bin/myfile.new /somewhere/else Thus, when the cron script calls this sub-script file (containing "myfile.xxx)", it will have the new file reference name "myfile.new" when it is supposed to be there. Thanks in advance for ideas.... Best regards, Jack L. Stone, Server Admin Sage-American http://www.sage-american.com jacks@sage-american.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message