Hello All:
I have a shell script that should open a crontab and add a new line and save after. However I cannot make it work. Any suggestion will be appreciated.
cron.sh
crontab -l > oracle.cron.20100509
newline="the contents of the new crontab line"
(crontab -l; echo "$newline") | crontab -
however the above gave me an error:
$ ./cron.sh
crontab: can't open your crontab file.
./cron.sh: line 2: 1177 Broken Pipe crontab -l
Please help
I have a shell script that should open a crontab and add a new line and save after. However I cannot make it work. Any suggestion will be appreciated.
cron.sh
crontab -l > oracle.cron.20100509
newline="the contents of the new crontab line"
(crontab -l; echo "$newline") | crontab -
however the above gave me an error:
$ ./cron.sh
crontab: can't open your crontab file.
./cron.sh: line 2: 1177 Broken Pipe crontab -l
Please help