Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Sep 2001 22:29:03 -0500
From:      jacks@sage-american.com
To:        freebsd-questions@freebsd.org
Subject:   Scripting question
Message-ID:  <3.0.5.32.20010929222903.03f12c60@mail.sage-american.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.20010929222903.03f12c60>