1 Reply Latest reply: Aug 13, 2012 11:32 AM by Dude! RSS

    dynamic filename for stdout from cron

      OL 5.6 x86-64

      I'm looking for a way to dynamicly specify a filename for stdout from a cron job.

      From a command line, this works fine:
      /home/estevens/bin/x1 > /tmp/estevens_x1_log.`date +%F_%H%M%S`
      Producing the desired output:
      estevens:dwdev$ ls -ltr /tmp/est*
      -rw-rw-r-- 1 estevens estevens 96 Aug 13 10:23 /tmp/estevens_x1_log.2012-08-13_102356
      But when I put that in my crontab:
      12 * * * 1 /home/estevens/bin/x1 > /tmp/estevens_x1_log.`date +%F_%H%M%S`
      I get this result
      /bin/sh: -c: line 0: unexpected EOF while looking for matching ``'
      /bin/sh: -c: line 1: syntax error: unexpected end of file
      (Result comes to me in an auto-generated email)