Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Programming in Linux _ I have a problem with crontab entry

Posted by: saturdaymarch Mar 29 2011, 01:26 PM

I have a problem with crontab entry

Here is what I have

0,5 * * * * echo The time is 'date' >> /root/filename

I need the current date and time to go to the file.

I get this when I do cat /root/filename

The time is date

thanks

Posted by: michaelk Mar 29 2011, 08:17 PM

Its all about how to execute commands in bash. Lots of help can be found by googling. The correct syntax is $( command )
However the old ways is using bacticks i.e. the key next to Esc .

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)