[geeks] Shell quoting question...

Francois Dion francois.dion at gmail.com
Mon Jul 17 09:27:33 CDT 2006


On 7/14/06, Robert Slover <robert.j.slover at verizon.net> wrote:
> > From: velociraptor <velociraptor at gmail.com>
> > I'm having some trouble with a cron job, I can't figure out how to
> > escape it to make it work...
[...]
> > 00 05 * * * /export/home/nmiller/script "profile%20name" > /dev/null
> > 2>&1
[...]
> The problem isn't that '%' is special to the shell -- it is special to
> *cron*.  For cron, it means to terminate the job specification at that
> point, and pass what follows as STDIN.  Each subsequent % means
> newline.

Looking at cron's source confirms that:
http://cvs.opensolaris.org/source/xref/on/usr/src/cmd/cron/cron.c

starting at line 1034 up to 1044.

Ciao,
Francois



More information about the geeks mailing list