Loki3
07-15-2002, 12:30 AM
I was reading the Introduction to Bash Programing HOWTO and was trying out the hello world script and I got an error.
$./hello.sh
bash: bash.scripts/hello.sh: /bin/bash: bad interpreter: Permission denied
$cat hello.sh
#!/bin/bash
echo Hello World
$ whereis bash
bash: /bin/bash /usr/lib/bash /usr/share/man/man1/bash.1.gz
$ ls -la /bin/bash
-rwxr-xr-x 1 root root 541096 Apr 12 16:09 /bin/bash
I don't really know what's wrong. Logging in as root doesn't fix it either. I checked other know good scripts that I didn't write and they have '#!/bin/sh', but using that instead of '#!/bin/bash' dosen't help. I'm using Red Hat 7.3 and bash-2.05a-13. Any advice? Thanks.
_Loki
$./hello.sh
bash: bash.scripts/hello.sh: /bin/bash: bad interpreter: Permission denied
$cat hello.sh
#!/bin/bash
echo Hello World
$ whereis bash
bash: /bin/bash /usr/lib/bash /usr/share/man/man1/bash.1.gz
$ ls -la /bin/bash
-rwxr-xr-x 1 root root 541096 Apr 12 16:09 /bin/bash
I don't really know what's wrong. Logging in as root doesn't fix it either. I checked other know good scripts that I didn't write and they have '#!/bin/sh', but using that instead of '#!/bin/bash' dosen't help. I'm using Red Hat 7.3 and bash-2.05a-13. Any advice? Thanks.
_Loki