Try:
YESTERDAY=`date "+%Y%m%d" -d yesterday` * * * * * root echo $YESTERDAY Note: The ` is the single tick, NOT a single quote. Ric Jeff Bearer wrote:
I'm attempting to set some variables with the output of 'date' in my crontab but for some reason they are not being evaluated. YESTERDAY=$(date +%Y%m%d -d yesterday) * * * * * root echo $YESTERDAY When cron runs that $YESTERDAY is set to "date +%Y%m%d -d yesterday" Why doesn't this work, and how do I get it to work?
-- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list