Anton Aylward wrote:
Joachim Schrod said the following on 11/23/2012 10:49 AM:
I use Perl to test that the env var is set for all cron jobs and not just for shell scripts.
If you used the 'env' command you'd see a lot more and that _might_ give a clue.
What clue _might_ I need? My posted scripts work. I tested them. Meike is right that $ENV is not sourced -- which is strange, but I didn't investigate. After she told that in her email, I wrote the scripts and tested it. (Before, I only relayed info from documentation.) My test result: $BASH_ENV is sourced when SHELL is set to /bin/bash; so she can use that. IMNSHO: One doesn't need any additional clue, output by the command env, here. I'm not interested in other env vars. I'm just interested in the one that is set in the to-be-sourced /tmp/setenv.sh. I also don't need to test that $ENV or $BASH_ENV are set, I use env vars in crontab all the time and that Just Works(tm), no need to check that again. I also don't want an entry like * * * * * env which would send email every minute. Instead I want it in a file where I can use F in less. In addition, IMO, just one line added there is better than a whole bunch of lines; one sees differences to previous invocations faster. Humans are excellent pattern matchers line-by-line, but not so block-by-block. I.e., I think my Perl script is also better than "env >>/tmp/foo.out". Maybe adding a timestamp to that one line would be helpful, and even for that the Perl script is better again, just add localtime() to the print statement. Just my 0.02 EUR, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jschrod@acm.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org