Bug 68201 - some commandlines are truncated
Summary: some commandlines are truncated
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: vixie-cron
Version: 7.2
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-07-08 01:19 UTC by summer
Modified: 2007-04-18 16:43 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-08-06 09:54:30 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.