*BSD News Article 94181


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!news.mathworks.com!rill.news.pipex.net!pipex!tank.news.pipex.net!pipex!news.utell.co.uk!usenet
From: brian@shift.utell.net (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Executing shell scripts.
Date: 22 Apr 1997 17:05:22 GMT
Organization: Awfulhak Ltd.
Lines: 27
Message-ID: <5jir4i$krf@ui-gate.utell.co.uk>
References: <01bc4e99$04988b00$cac2f8c6@cecilstoll.sccc.cc.ks.us>
Reply-To: brian@awfulhak.org, brian@utell.co.uk
NNTP-Posting-Host: shift.utell.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Newsreader: knews 0.9.8
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:39535


In article <01bc4e99$04988b00$cac2f8c6@cecilstoll.sccc.cc.ks.us>,
	"Cecil O. Stoll" <cstoll@sccc.cc.ks.us> writes:
> 
> I am having trouble executing shell scripts from the command line with
> FreeBSD 2.1.5.  I have changed the mode of the scripts they are readable
> and executable.  After searching the mail list archives @www.freebsd.org, I
> added the "#!/bin/sh" line at the top of the script but this didn't help. 
> The scripts can be executed by typing "sh scriptname" or "bash scriptname"
> or even "csh scriptname".  I obviously missed something very important
> here.  Any help and information will be appreciated.
> 
> Thank you in advance.

Let me guess, the scripts are in the current directory ?  The current
directory isn't part of your PATH ?

Unlike DOS, unix doesn't treat "." as being part of the PATH unless
specified as such.  Most people consider having "." in your path as
a security risk.

> Cecil Stoll
> SCCC

-- 
Brian <brian@awfulhak.org> <brian@freebsd.org>
      <http://www.awfulhak.org>
Don't _EVER_ lose your sense of humour !