delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/11/01/15:04:56

From: GWhaley AT crossprod DOT co DOT uk (Graham Whaley)
Subject: Re: what did I miss? #!.... doesn't work in bash
1 Nov 1996 15:04:56 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <327A3119.cygnus.gnu-win32@charlotte.crossprod.co.uk>
Original-To: "gnu-win32 AT cygnus DOT com" <gnu-win32 AT cygnus DOT com>
Encoding: 54 TEXT
X-Mailer: Microsoft Mail V3.0
Original-Sender: owner-gnu-win32 AT cygnus DOT com

  Err, I thought that the decoding of a '#!' line had moved into the kernel 
on *IX, and was not a bash/shell/user level thing?.  You'll have to excuse 
me if I'm wrong, I've not really delved into ther kernel for a number of 
years.
  If this were the case though then I guess it's down to the cygwin.dll exec 
functions to do the test and execute.
  Just my thoughts (and I'd be interested if anybody has an AUTHORITATIVE 
answer to this),
     
     Graham

 ----------
From: gnu-win32-owner
To: David Jeffers
Cc: Bret A. Schuhmacher; gnu-win32
Subject: Re: what did I miss? #!.... doesn't work in bash
Date: 01 November 1996 09:26

Still, the bang line must be interpreted in the other cases, like:
#!/usr/local/bin/perl, #!/bin/csh, or #!/usr/local/bin/tk. In these
cases, the first line is the only one that bash (or other shells) should
understand. In fact, bash will choke on (usable) scripts running under
those shells.

Long.


David Jeffers wrote:
>
> >>>>> "Bret" == Bret A Schuhmacher <bas AT wn DOT com> writes:
>
>     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...
[...]
 -
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019