Red Hat Bugzilla – Bug 68201
some commandlines are truncated
Last modified: 2007-04-18 12:43:56 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513
Description of problem:
Commandline entries in crontabs that are (partly)enclosed in backticks:
or use parentheses for the same effect (here's the one that's bugging me now)
00 00 8-14 * * [ $(date +%w) = '2' ] && mail -s 'Network 2000 meeting tonight'
The above command is valid at the bash prompt, but in a crontab I get this:
/bin/bash: -c: line 1: unexpected EOF while looking for matching `)'
/bin/bash: -c: line 2: syntax error: unexpected end of file
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Add this to your crontab
2.00 00 8-14 * * [ $(date +%w) = '2' ] && mail -s 'Network 2000 meeting tonight'
3.Read the mail;-)
Actual Results: I already told you
Expected Results: If I got the logic right, I should get email about meetings
the second Tuesdat of each month.
I'm not sure I agree with your severity coding. If the program sometimes fails
and the user doesn't know about it until after the event, that is serious.
This problem dates back (at least) to RHL 4.2.
Btw what is wrong with:
00 00 8-14 * 2 mail -s 'Network 2000 meeting tonight'
Got it. Please see crontab(5). '%' has a special meaning in a crontab
command: it denotes EOL. If you think any of the other problems are
still present please re-open this bug.