[Bug 1110147] Re: Error in manual
Launchpad Bug Tracker
1110147 at bugs.launchpad.net
Mon May 6 15:15:35 UTC 2013
Status changed to 'Confirmed' because the bug affects multiple users.
** Changed in: cron (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to cron in Ubuntu.
https://bugs.launchpad.net/bugs/1110147
Title:
Error in manual
Status in “cron” package in Ubuntu:
Confirmed
Bug description:
The manual for crontab(5) shows various examples of using the date command as such:
$(date +%u)
This contradicts the note specifying that any % sign needs to be
escaped
Entering something like that as a command for execution fails to
interpret anything past the % sign.
so, for example:
* * * * * echo $(date +%Y)
fails with
/bin/sh: 1: Syntax error: end of file unexpected (expecting ")")
The syslog shows this
CRON[10104]: (root) CMD (echo $(date +)
Simply escaping the % resolves it, so in this example, the manual
should be updated so that each 'date' example looks as
$(date +\%u) - or whatever the format character example is.
My example cron from above executes as expected as
* * * * * echo $(date +\%Y)
which send me an email simply with "2013"
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cron/+bug/1110147/+subscriptions
More information about the foundations-bugs
mailing list