From owner-freebsd-questions Mon Oct 20 14:55:55 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA22591 for questions-outgoing; Mon, 20 Oct 1997 14:55:55 -0700 (PDT) (envelope-from owner-freebsd-questions) Received: from shell6.ba.best.com (jkb@shell6.ba.best.com [206.184.139.137]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id OAA22586 for ; Mon, 20 Oct 1997 14:55:52 -0700 (PDT) (envelope-from jkb@best.com) Received: from localhost (jkb@localhost) by shell6.ba.best.com (8.8.7/8.7.3) with SMTP id OAA13155; Mon, 20 Oct 1997 14:55:07 -0700 (PDT) X-Authentication-Warning: shell6.ba.best.com: jkb owned process doing -bs Date: Mon, 20 Oct 1997 14:55:07 -0700 (PDT) From: Jan Koum X-Sender: jkb@shell6.ba.best.com To: Jason Wells cc: freebsd-questions@FreeBSD.ORG Subject: Re: Force a script to use shell foo In-Reply-To: <3.0.3.32.19971020204450.007b78a0@jcwells.deskmail.washington.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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 > >