I have written following script.
Quote:
#!/bin/sh
mydate=`/bin/date | /usr/bin/cut -f 3 -d " "`
/bin/echo $mydate >> /usr/home/parag/date.txt
|
I am running this through crontab as a non root user:
$crontab -l
Quote:
* * * * * /usr/home/parag/mydate > /dev/null 2>&1
|
The script executes but "date.txt" is empty when it runs through crontab. However on manually running the same script the date is getting appended to the "date.txt" file.
I am using FreeBSD 7.0
Any pointers.