For all the Kornshell/scripting newbies like me, thought you
might be interested in what the doctor prescribed.
|Your script wants to use a parameter of some kind called DATA, and
|you have it defined as an environment variable in your interactive
|command line environment, but the shell that's running your cron
|job does NOT read all of your interactive login startup scripts (it
|may not even be the shell you normally use, so you might not have
|your environment set up right if you changed your shell). You have
|to have your script establish the right environment. One way to
|get all of your stuff out is to use "printenv" to print all of
|your interactive environment variables into a file, then edit the
|file to put them into a "source-able" format for the shell that
|you like to use in your scripts, and then read it at the start of
|your cron job. Alternatively, you could write a wrapper script
|that establishes the equivalent of your interactive environment
|and then invokes its first argument passing the rest of the args
|to that script. There are LOTS of ways to do this.
|Welcome to how "cron" really works.
|Tom
Received on Fri Nov 30 2001 - 10:55:46 NZDT