need to echo / printf string containing date as parameter in cron
Is it possible to get cron to echo (or printf) the following string:
1110225^1110225^1110225^1110225^1110225
(with 110225 obviously being current date - at command line I obtained this string using
printf 1$(date +"%y%m%d")^1$(date +"%y%m%d")^1$(date +"%y%m%d")^1$(date +"%y%m%d")^1$(date +"%y%m%d")
But cron does not like this string - says
.... printf 1$(date +"
Content-Type: text/plain; charset=ANSI_X3.4-1968
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/db2inst1>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=db2inst1>
X-Cron-Env: <USER=db2inst1>
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
|