[CentOS] Running shell scripts from external media

Thu Jul 3 14:53:25 UTC 2008
Greg Bailey <gbailey at lxpro.com>

James B. Byrne wrote:
> Problem:
> As 'root', when running a script resident on the external drive mounted at
> /media/disk I receive the following error:
>
> /bin/sh: bad interpreter: Permission denied
>
>   

Usually, I've found this is because the file is stored with DOS style 
line endings.
Maybe you could try:

dos2unix -n hello.sh hello2.sh
chmod +x hello2.sh
./hello2.sh

Does that fix it?

Greg