Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!sbphy.mit.edu!bfox From: bfox@sbphy.mit.edu (Brian Fox) Newsgroups: gnu.bash.bug Subject: BASH and Bourne Shell scripts Message-ID: <9002210515.AA12755@sbphy.Ucsb.EDU> Date: 21 Feb 90 05:15:40 GMT References: <376@peyote.cactus.org> Sender: daemon@tut.cis.ohio-state.edu Reply-To: bfox@ai.mit.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 27 Date: 9 Feb 90 23:53:27 GMT From: milano!peyote!galew_a@cs.utexas.edu (Andy Galewsky) Organization: Capital Area Central Texas Unix Society, Austin, TX Sender: bug-bash-request@prep.ai.mit.edu I hope I'm not just being stupid (it has happened before) but - when I am running BASH-1.04 and I try to execute a Bourne shell script - I can't get /bin/sh to execute it -- BASH tries to do it. I have tried putting #!/bin/sh as the first line of the shell script - but BASH continues to try to execute it - itself. It doesn't seem right that I have to throw away all of my old shell scripts in order to run BASH. This is probably not a BASH bug - but just a problem with my understanding of how this works. Thanks Andy Galewsky Clinical Resource Systems peyote!sneffels!andy galew_a@peyote.cactus.org System V machines don't pay attention to #! in the first line. Their fault, not yours. If the system call exec () didn't exec the file, then bash assumes that the file is a bash script. Not a bad assumption, and in fact, the same assumption that /bin/sh makes. Brian