From owner-freebsd-questions Tue Oct 21 04:58:49 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA09326 for questions-outgoing; Tue, 21 Oct 1997 04:58:49 -0700 (PDT) (envelope-from owner-freebsd-questions) Received: from iglou2 (exim@iglou2.iglou.com [192.107.41.17]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id EAA09320 for ; Tue, 21 Oct 1997 04:58:44 -0700 (PDT) (envelope-from patrick@cre8tivegroup.com) Received: from gateway.cre8tivegroup.com [204.255.227.64] by iglou2 with smtp (8.7.3/8.6.12) id 0xNcxF-0006x9-00; Tue, 21 Oct 1997 07:58:34 -0400 Message-ID: X-Mailer: XFMail 1.0 [p0] on FreeBSD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <3.0.3.32.19971020204450.007b78a0@jcwells.deskmail.washington.edu> Date: Tue, 21 Oct 1997 07:56:42 -0400 (EDT) Organization: The Creative Group From: Patrick Gardella To: Jason Wells Subject: RE: Force a script to use shell foo Cc: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Take a look at some of the scripts in /etc. Particularly the first line. #!/usr/local/bin/perl is one I use, and although not a shell, points the way. Just change the line to match your shell, and that problem is solved. O'Reilly has a series on the shells which might help. "Learning the bash shell" is one. Patrick On 20-Oct-97 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