From: jeffers@redrose.net (David Jeffers)
Subject: Re: what did I miss? #!.... doesn't work in bash
1 Nov 1996 15:58:10 -0800
Sender: daemon@cygnus.com
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <199611011727.JAA09950.cygnus.gnu-win32@cygnus.com>
References: <199610311912.LAA04347@cygnus.com>
	<199611011413.IAA10021@lesol1.dseg.ti.com>
Original-To: James Dumser <dumser@lesol1.dseg.ti.com>
Original-Cc: gnu-win32@cygnus.com, bas@wn.com
In-Reply-To: <199611011413.IAA10021@lesol1.dseg.ti.com>
Original-Sender: owner-gnu-win32@cygnus.com

>>>>> "James" == James Dumser <dumser@lesol1.dseg.ti.com> writes:

    James> On Thu, 31 Oct 1996 11:12:02 -0800, David Jeffers
    James> <jeffers@redrose.net> 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...

    James> But you're not answering Bret's question. Sure the above
    James> script works, but try #!/bin/awk { print $1 } This will
    James> work in Unix, but bash (execve() really) still passes this
    James> to bash instead of awk. So the question is how to get bash
    James> to execute a script file with an interpreter other than
    James> bash.

    I thought 
    The question was "HOW do I get various programs to work...
    like "perl" and "tcsh" etc and I offered a solution. I have
    no problem using perl, or any executable in any script, so
    I think his REAL complaint was that it doesn't work just like
    it does in Unix. Well, the first you learn in Unix is "there's
    always more than one way to do something..."

    To each his own!

    David Jeffers	    
<jeffers@redrose.net>

-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
