From: mauch AT uni-duisburg DOT de (Michael Mauch) Newsgroups: comp.os.msdos.djgpp Subject: Re: bash and scripts Date: Tue, 29 Jul 1997 23:19:13 +0200 Organization: Home, sweet home (via Gesamthochschule Duisburg) Lines: 38 Message-ID: <5rlmmi$qlv$1@news-hrz.uni-duisburg.de> References: <33DD93F6 DOT C828A179 AT geocities DOT com> NNTP-Posting-Host: ppp71.uni-duisburg.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Tue, 29 Jul 1997 06:55:50 GMT, Wadhah Al-Tailji wrote: > Now my next question. How can I get bash to recognize scripts? (i.e.: > run them when > I type in the file name). The script in question is executable and even > shows three 'x's > in ls -la. The only way I can get it to run the script is type 'bash > ' from my > DOS prompt. I had this same problem a while ago. Like other Unix shells, bash doesn't search the current directory for executables, unless you don't have a "." in your PATH variable. You should be able to run your script.sh from inside bash by typing "./script.sh". If you choose to ignore the warnings in the Unix FAQ, you can include the current directory in the PATH variable for bash and/or sh in djgpp.env: [bash] PATH=.;%PATH% [sh] PATH=.;%PATH% The Unix FAQ posted to comp.unix.questions,comp.unix.shell,comp.answers and news.answers says that it is a bad idea to include the current directory in your PATH. They say you could inadvertently run a Trojan program, e.g. if your are in /tmp and type "ls", somebody could have put another "ls" there. I don't think this is much of a problem on a single user machine. Regards... Michael -- Spammers: ask secretreports AT answerme DOT com for free info about how to explode your business. hoefner AT ddv DOT de wants to learn more about spam and UCE. Please help him.