On Mon, 2004-02-23 at 10:29, Patrick Dunford wrote:
> Hi, just trying a very simple hello world script
> 
> #!/bin/bash
> echo Hello World
> 
> saved as helloworld
> 
> Trying to run this ./helloworld
> 
> returns
> 
> bash: ./helloworld: /bin/bash: bad interpreter: Permission denied
> 
> whereis bash returns
> 
> bash: /bin/bash /etc/bash/bash.rc /usr/share/man/man1/bash.gz
> 
> This is the same whether logged in as root or not. What is happening here?

Your script is not executable?
$ chmod +x helloworld
$ ./helloworld

Also, you can run the script under a shell (ignoring the #! line) with

$ bash ./helloworld

BTW, trying things as root "just in case" is terribly bad - please don't
do it.

-jim

Reply via email to