Brad
That did it - thanks
Simon...
----- Original Message -----
From: "Brad Jorsch" <[EMAIL PROTECTED]>
To: "Triangle Linux Users Group discussion list" <[email protected]>
Sent: Thursday, February 01, 2007 9:24 PM
Subject: Re: [TriLUG] dayname in cron ?
On Thu, Feb 01, 2007 at 09:05:14PM -0500, S B wrote:
*/1 * * * * echo hello >/var/test-$(date +"%a").txt
According to the crontab file manpage ("man 5 crontab"), '%' is
translated to a newline and everything after the first % is passed as
standard input. So your command there is being interpreted as something
like
echo 'a").txt' | sh -c 'echo hello >/var/test-$(date +"'
This worked for me when I put it in my crontab:
*/1 * * * * echo hello >/tmp/test2-$(date +"\%a").txt
--
TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
--
TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/