From: Roger Pack Date: 2010-11-05T23:04:58+09:00 Subject: [ruby-core:33069] Re: Fwd: Re: ruby requires shebang for executable files? > Ah, you says about following? > > % cat test.sh > printf "foo" > % perl -e'print `./test.rb`' > % perl -e'print exec("./test.rb")' > 0 > % perl -e'print exec("./test.sh")' > foo > % perl -e'print system("./test.sh")' > foo0 > % perl -e'print `./test.sh`' > foo > % ruby -e'print `./test.sh`' > -e:1: command not found: ./test.sh > % ./ruby -e'print `./test.sh`' > -e:1:in ``': Exec format error - ./test.sh (Errno::ENOEXEC) > � � � �from -e:1:in `
' > % ./ruby -e'print system("./test.sh")' > % ./ruby -e'print exec("./test.sh")' > -e:1:in `exec': Exec format err Yes. Basically default to /bin/sh if there's no shebang (like perl and bash seem to, so it seems standard). Thanks! -r