Date: Mon, 20 Oct 1997 14:55:07 -0700 (PDT) From: Jan Koum <jkb@best.com> To: Jason Wells <jcwells@u.washington.edu> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Force a script to use shell foo Message-ID: <Pine.BSF.3.96.971020145229.12527A-100000@shell6.ba.best.com> In-Reply-To: <3.0.3.32.19971020204450.007b78a0@jcwells.deskmail.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello, 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. HOME and SHELL may be overridden by settings in the crontab; LOGNAME may not. Just put "SHELL=/usr/local/bin/bash" at the begining of the crontab file. Take a look at /etc/crontab for an example. -- Yan On Mon, 20 Oct 1997, Jason Wells wrote: >I am familiar with running scripts from the command line. I assume that my >scripts inherit the shell that I am using. Is this correct? I have only >worked with bash so this is the context of this email. > >Lets say I run a script from cron. There is no shell to inherit. The script >would use /bin/sh. But silly me, I wrote my program to use bash. > >Is it sufficient to just enter the command /usr/local/bin/bash within the >script to get the script to use bash? If not, how do I set up an >environment for a program? > >Thanks, >Jason Wells > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971020145229.12527A-100000>