From: dumser AT lesol1 DOT dseg DOT ti DOT com (James Dumser) Subject: Re: what did I miss? #!.... doesn't work in bash 1 Nov 1996 13:36:34 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199611011413.IAA10021.cygnus.gnu-win32@lesol1.dseg.ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Original-To: jeffers AT redrose DOT net (David Jeffers) Original-Cc: gnu-win32 AT cygnus DOT com, bas AT wn DOT com In-Reply-To: <199610311912.LAA04347@cygnus.com> from "David Jeffers" at Oct 31, 96 11:12:02 am X-Mailer: ELM [version 2.4 PL23] Content-Length: 1017 Original-Sender: owner-gnu-win32 AT cygnus DOT com On Thu, 31 Oct 1996 11:12:02 -0800, David Jeffers wrote: > The bang "#!/usr/sh" line isn't really necessary for shell > scripts using Cygnus bash. I remember reading about a > "magic cookie" but all my scripts work with it or without it > on Win 95. NT Perl uses a BAT file to build an executable > so again it isn't necessary. > > For instance: > > #!/bin/sh <---not necessary? > awk ' { print $1 } ' > works fine since awk is in my PATH. > > I think the "#!/bin/sh" line in Cygnus simply means > "this is an executable" since I don't even have to > chmod +x after I write the scripts like I do in Linux... But you're not answering Bret's question. Sure the above script works, but try #!/bin/awk { print $1 } This will work in Unix, but bash (execve() really) still passes this to bash instead of awk. So the question is how to get bash to execute a script file with an interpreter other than bash. -- James Dumser 972-462-5335 dumser AT ti DOT com - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".