[TriLUG] dayname in cron ?
Magnus
magnus at trilug.org
Thu Feb 1 21:16:16 EST 2007
S B wrote:
> Hi
>
> I'm trying to redirect the output of a cron job to a file with the current day in the filename. The following demo works but includes the full date:
>
>
> */1 * * * * echo hello >/var/test-$(date).txt
>
>
> so I'm trying to pass the %a fomat string to 'date':
>
>
> */1 * * * * echo hello >/var/test-$(date +"%a").txt
>
>
> however this (and numerous other variations) don't work - any suggestions?
*/1 * * * * echo hello >/var/test-`date +%a`.txt
--
Trying to figure out what to do with big heavy and retired Sun servers
in the Raleigh area? Drop me a note.
More information about the TriLUG
mailing list