Mail Archives: djgpp/1997/08/01/21:02:00
On Tue, 29 Jul 1997 06:55:50 GMT, Wadhah Al-Tailji
<altailji AT geocities DOT com> 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
> <scriptname>' 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.
- Raw text -