[TriLUG] dayname in cron ?
merlin180 at hotmail.com
Thu Feb 1 21:31:15 EST 2007
That did it - thanks
----- Original Message -----
From: "Brad Jorsch" <anomie at users.sourceforge.net>
To: "Triangle Linux Users Group discussion list" <trilug at trilug.org>
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
> 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/
More information about the TriLUG