Your message dated Sun, 1 May 2016 22:51:43 +0200
with message-id <[email protected]>
and subject line Re: error in crontab manpage example (unescaped percent signs)
has caused the Debian Bug report #705862,
regarding error in crontab manpage example
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
705862: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=705862
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cron
Version: 3.0pl1-116
Severity: normal
Hi,
Amongst the examples given in crontab(5), one can find:
# Run on every second Saturday of the month
0 4 8-14 * * test $(date +%u) -eq 6 && echo "2nd Saturday"
This doesn't work, because % is special (in the same
manpage: "Percent-signs (%) in the command, unless escaped
with backslash (\), will be changed into newline
characters")
The correct line should read:
0 4 8-14 * * test $(date +\%u) -eq 6 && echo "2nd Saturday"
Cheers,
Y.
-- Package-specific info:
--- EDITOR:
--- usr/bin/editor:
/usr/bin/vim.gtk
--- /usr/bin/crontab:
-rwxr-sr-x 1 root crontab 30248 Dec 19 2010 /usr/bin/crontab
--- /var/spool/cron
drwxr-xr-x 5 root root 4096 Oct 11 2005 /var/spool/cron
--- /var/spool/cron/crontabs
drwx-wx--T 2 root crontab 4096 Apr 21 10:33 /var/spool/cron/crontabs
-- System Information:
Debian Release: 6.0.7
APT prefers stable
APT policy: (990, 'stable')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash
Versions of packages cron depends on:
ii adduser 3.112+nmu2 add and remove users and groups
ii debianutils 3.4 Miscellaneous utilities specific t
ii dpkg 1.15.8.13 Debian package management system
ii libc6 2.13-37 Embedded GNU C Library: Shared lib
ii libpam-runtime 1.1.1-6.1+squeeze1 Runtime support for the PAM librar
ii libpam0g 1.1.1-6.1+squeeze1 Pluggable Authentication Modules l
ii libselinux1 2.0.96-1 SELinux runtime shared libraries
ii lsb-base 3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip
Versions of packages cron recommends:
ii exim4 4.72-6+squeeze3 metapackage to ease Exim MTA (v4)
ii exim4-daemon-heavy [mail 4.72-6+squeeze3 Exim MTA (v4) daemon with extended
ii lockfile-progs 0.1.15+squeeze1 Programs for locking and unlocking
Versions of packages cron suggests:
ii anacron 2.3-14 cron-like program that doesn't go
pn checksecurity <none> (no description available)
ii logrotate 3.7.8-6 Log rotation utility
Versions of packages cron is related to:
pn libnss-ldap <none> (no description available)
pn libnss-ldapd <none> (no description available)
pn libpam-ldap <none> (no description available)
pn libpam-mount <none> (no description available)
pn nis <none> (no description available)
pn nscd <none> (no description available)
-- no debconf information
--- End Message ---
--- Begin Message ---
Version: 3.0pl1-121
On Fri, 25 Apr 2014 15:43:36 +0200 Walter Doekes <[email protected]> wrote:
> I just noticed the same bug. It is in:
> 3.0pl1-120ubuntu4
> but not in:
> 3.0pl1-124ubuntu2
>
>
> It has already been fixed in 2011 in the debian-cron-git repo:
>
> git://git.debian.org/git/pkg-cron/pkg-cron.git
>
>
> commit fe274309d8d7e7787e06d2cb88ec4ed280b63805
> Author: Javier Fernandez-Sanguino <[email protected]>
> Date: Wed Sep 21 23:22:58 2011 +0200
>
> Escape the '%' in the examples so that they can work when copied
> over to crontab (Closes: #642309)
> ...
> -0 4 8-14 * * test $(date +%u) \-eq 6 && echo "2nd Saturday"
> +0 4 8-14 * * test $(date +\\%u) \-eq 6 && echo "2nd Saturday"
Thank you for noticing this! Closing.
Regards,
Christian
signature.asc
Description: OpenPGP digital signature
--- End Message ---