Bug 68201

Summary: some commandlines are truncated
Product: [Retired] Red Hat Linux Reporter: summer
Component: vixie-cronAssignee: Jens Petersen <petersen>
Status: CLOSED NOTABUG QA Contact: Brock Organ <borgan>
Severity: high Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-08-06 09:54:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description summer 2002-07-08 01:19:37 UTC
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:
echo `date`
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'
computerdatasafe.au

are truncated.

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):


How reproducible:
Always

Steps to Reproduce:
1.Add this to your crontab
2.00 00 8-14 * * [ $(date +%w) = '2' ] && mail -s 'Network 2000 meeting tonight'
computerdatasafe.au
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.


Additional info:

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.

Comment 1 Jens Petersen 2002-08-06 09:54:26 UTC
Btw what is wrong with:

00 00 8-14 * 2 mail -s 'Network 2000 meeting tonight'

?  ;-)


Comment 2 Jens Petersen 2002-08-06 16:33:29 UTC
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.