[LBo] crontab syntax error

Billy Pollifrone billy at silverbaseball.com
Mon Dec 18 17:30:15 CET 2006


Stefan Waidele wrote:
> Dave Lerner schrieb:
> =

> As we found out last night in IRC, when the shell is called as "sh", it
> runs in "POSIX-mode".
> =

> Obviously, the percent-character '%' has a meaning in this mode. I tried
>  your line with quoted % and it worked:
> =

> echo "`date +\%Y\%m\%d_\%H\%M\%S`: testing" >>...
> =


Yes. Escaping the % character is one way. The other way is to edit the
system-wide crontab entry (/etc/crontab on my system) defining the SHELL
variable to be /bin/bash to get out of POSIX mode.

-- =

Billy Pollifrone
billy AT silverbaseball DOT com
Registered Linux User #433318 (http://counter.li.org)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://linuxbasics.org/pipermail/qna/attachments/20061218/fb731a0b/si=
gnature.pgp


More information about the QnA mailing list