Re: Oracle/Unix shell script question...
Date: 12 Dec 2001 12:39:49 +0200
Message-ID: <m3bsh4d8ne.fsf_at_muikku.baana.suomi.net>
ocsfan_at_yahoo.com (Steve) writes:
> an Oracle table. This script is in production and a cron job runs it
> weekly, on Saturdays. But I have to change this script EVERY week to
> do two things: Increment the "jobno" field (in the script, it is
> toward the bottom - "33") and change the "datetime" field to the date
There were already a suggestion to use a sequence for the "33" and it will work supposing that the script in no circumstances gets run twice.
Another possibility is to write another program that modifies your program. It is not difficult, perl or tcl might be easiest tools for this. Or awk would but, but it seems to me that awk lacks date functions and it might be interesting to find out a way to express the "next saturday" in awk. .. GNU awk seems to have system() and strftime() so it would do the job, osf/1 awk doesn't seem to have, RS/6k runs AIX ? and I don't know about that.
-- Antti Järvinen, costello_at_iki.fi "concerto for two faggots and orchestra"Received on Wed Dec 12 2001 - 11:39:49 CET