On 06-Jan-2000 Dave Sherohman wrote: > Wayne Topa said: >> All of these worked : #!/bin/sh, # !/bin/sh, #! /bin/sh and >> the script even worked _without_ any #! line _at all_!!! I have no >> idea why it worked, but it does????? > > I suspect that it's because you're running it from bash, so bash gets to > interpret it if nobody else is specified, just like if you'd typed it in > from > the command line.
That is exactly it. I remember reading that somewhere. If the interpreter is not specified, bash is assumed. That explained why when I was new to this stuff, my bash scripts worked even when I left out '#!/bin/sh' -- Andrew