Date: Tue, 21 Oct 1997 07:56:42 -0400 (EDT) From: Patrick Gardella <patrick@cre8tivegroup.com> To: Jason Wells <jcwells@u.washington.edu> Cc: freebsd-questions@freebsd.org Subject: RE: Force a script to use shell foo Message-ID: <XFMail.971021075946.patrick@cre8tivegroup.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
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.971021075946.patrick>