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.
--
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/

Reply via email to