I am trying to setup some cron jobs on my RHEL 2 box the same way I run them on Solaris 8. On Solaris, I have a crontab entry of:
Code:
* * * * * (/bin/ksh ". $HOME/.profile; env")
which correctly sources my .profile and mails me back the output from env
after the .profile has been sourced.
However, in RHEL 2, I setup a crontab entry with the exact same syntax, and I get a message back from cron stating:
/bin/ksh: . /home/users/myuser/.profile; env: No such file or directory
The error means /bin/ksh is trying to execute a file named ". $HOME/.profile; env" which of course is not there. How do I get RHEL's ksh to execute multiple comands in a crontab?
miscellanea: This is just an example. I understand I can wrap "env" around another ksh script and source the .profile there, but there should be a way to do it within the crontab entry.