Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 55293 - When using a backslash (\) to escape a percent-sign (%), vixie cron passes the escape character to the command
Summary: When using a backslash (\) to escape a percent-sign (%), vixie cron passes th...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Cron Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-26 18:12 UTC by Eric Pretorious
Modified: 2004-10-08 07:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Pretorious 2004-06-26 18:12:00 UTC
When using a backslash (\) to escape a percent-sign (%) in a command, vixie cron passes the escape character to the command along with the percent-sign.

Reproducible: Always
Steps to Reproduce:
1. crontab -e
2. create command:
   -s "Message from `hostname` (`date '+\%A, \%B \%d \%Y'`)" admin@leaguehost.net
3. exit
4. wait
Actual Results:  
E-mail subject: 
Message from home (\Saturday, \June \26 \2004) 

Expected Results:  
E-mail subject: 
Message from home (Saturday, June 26 2004)
Comment 1 Eric Pretorious 2004-06-26 18:18:17 UTC
Step #2 *should* read:
2. create command:
   0 * * * * /bin/mailx -s "Message from `hostname` (`date '+\%A, \%B \%d \%Y'`)" admin@leaguehost.net
Comment 2 Ciaran McCreesh 2004-06-27 23:52:26 UTC
This appears to be a feature... AFAICS, vixie-cron only replaces % with a newline when it's not inside a quoted string. When you're using "" or '' the \ is unnecessary.
Comment 3 Aaron Walker (RETIRED) gentoo-dev 2004-10-08 07:56:28 UTC
vixie-cron 4.1 seems to handle this better.