rgheck writes:
Hi, Here is a line from my cron file:55 2,4,6,8,10,12,14,16,18,20,22 * * * audiogon.pl -f /tmp/rss/bw.xml 'http://cgi.audiogon.com/cgi-bin/srch_fs.pl?WORD=b%26w&FOCUS=EXY&CTGSK=spkrfull&submit=Search'It doesn't matter here what the audiogon.pl script does. (It scrapes the URL given and creates an RSS feed.) The problem is that this will not run./bin/sh: -c: line 0: unexpected EOF while looking for matching `"' /bin/sh: -c: line 1: syntax error: unexpected end of fileThe subject line of the email reads:Cron <rgheck@rghquad> /home/rgheck/bin/audiogon.pl -f /tmp/rss/bw.xml 'http://cgi.audiogon.com/cgi-bin/srch_fs.pl?WORD=bSo the problem seems to be the embedded "%26" in the command: Thats is the URL-encoding for the ampersand (we're searching for "B&W" loudspeakers). But even the single-quotes seem not to be protecting it from the shell. And is it relevant that it encodes the ampersand? Or is it the "%" that is causing the problem?Whichever it is, does anyone know how this can be made to run?
From the crontab(5) manual page reads:
The "sixth" field (the rest of the line) specifies the command to be run. The entire command portion of the line, up to a newline or % character, will be executed by /bin/sh or by the shell specified in the SHELL variable of the cronfile. Percent-signs (%) in the command, unless escaped with backslash (\), will be changed into newline charac- ters, and all data after the first % will be sent to the command as standard input.
Attachment:
pgp458fPWq2Tg.pgp
Description: PGP signature
-- fedora-list mailing list fedora-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines