[TriLUG] dayname in cron ?
S B
merlin180 at hotmail.com
Thu Feb 1 21:31:15 EST 2007
Brad
That did it - thanks
Simon...
----- 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
> 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/
>
More information about the TriLUG
mailing list