Bug 68201 - some commandlines are truncated
some commandlines are truncated
Product: Red Hat Linux
Classification: Retired
Component: vixie-cron (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jens Petersen
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2002-07-07 21:19 EDT by summer
Modified: 2007-04-18 12:43 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-08-06 05:54:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description summer 2002-07-07 21:19:37 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:
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'

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:

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.

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 05:54:26 EDT
Btw what is wrong with:

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

?  ;-)
Comment 2 Jens Petersen 2002-08-06 12:33:29 EDT
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.