I have written following script.
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:
* * * * * /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