On Tue, 31 Oct 2006, Jason Cox <[EMAIL PROTECTED]> wrote: > Hi all, > I have the following in a cron job > /usr/bin/rsync -ub --suffix=~$(date +%F) /Data/Jobs/ /Data/Backups/Jobs/ > -razv --no-whole-file --ignore-errors partial > > Problem is that when the command is run on the command line everything > works. However, when its in a cron job it fails with the following, > > /bin/sh: -c: line 0: unexpected EOF while looking for matching `)' > /bin/sh: -c: line 1: syntax error: unexpected end of file > > Anyone seen this before or able to put some light on the problem?
Cron treats '%' as a special character. From the crontab man page: The sixth field of a line in a crontab file is a string that is executed by the shell at the specified times. A percent character in this field (unless escaped by \) is translated to a NEWLINE character. HTH. John -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html