[lug] Shell/Cron and passing args

Kenneth D. Weinert mc at morat.net
Thu Jan 30 13:16:54 MST 2003


On Thu, 30 Jan 2003 13:16:47 -0700 (MST)
Chip Atkinson <chip at rmpg.org> wrote:

> Hi John.
> 
> Are you trying to take the output of make_featured.php with an argument of
> links?  If so, you probably want to use back ticks.  I believe that cron
> uses sh rather than bash.

	Won't cron use the value of SHELL= in the crontab file?

	From "man 5 crontab":

 Several  environment  variables are set up automatically by the cron(8)
 daemon.  SHELL is set to /bin/sh, and LOGNAME and HOME are set from
 the /etc/passwd line of the crontab's owner.  PATH is set to
 "/usr/bin:/bin".  HOME, SHELL, and PATH may be overridden by settings
 in the crontab; LOGNAME may not.

	This may be (and probably is) distribution (or at least GNU
tools) specific behaviour, so if you need to be portable then Chip's
answer is more correct.

-- 
/~\ The ASCII        Ken Weinert   Ken.Weinert at ihs.com 
\ / Ribbon Campaign  303-858-6956 (V) 303-705-4258 (F)
 X  Against HTML     GnuPG: 9274F1CE  GnuPG available at http://www.gnupg.org/
/ \ Email!           1D87 3720 BB77 4489 A928  79D6 F8EC DD76 9274 F1CE
Your mind must be at least >THIS WIDE< to comprehend the above message




More information about the LUG mailing list