delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/10/31/17:43:34

From: jeffers AT redrose DOT net (David Jeffers)
Subject: Re: what did I miss? #!.... doesn't work in bash
31 Oct 1996 17:43:34 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199610311912.LAA04347.cygnus.gnu-win32@cygnus.com>
References: <Pine DOT LNX DOT 3 DOT 91 DOT 961030122503 DOT 3502I-100000 AT webnet DOT wn DOT com>
Original-To: "Bret A. Schuhmacher" <bas AT wn DOT com>
Original-Cc: gnu-win32 AT cygnus DOT com
In-Reply-To: <Pine.LNX.3.91.961030122503.3502I-100000@webnet.wn.com>
Original-Sender: owner-gnu-win32 AT cygnus DOT com

>>>>> "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...

   
    Bret> OK, what part of the manual did I miss?  I can't get scripts
    Bret> with #!/bin/tclsh or #!/bin/perl or whatever to work.  Is
    Bret> this a configuration thing?  Is this a path thing (/bin is
    Bret> in the path, as is .).

    Bret> I downloaded the bash source code and found some code in
    Bret> execute_cmd.c that would do the trick... but I can't find
    Bret> the bash code that was ported to Win/NT.  I can't get my
    Bret> compiled bash to tell me what version it is, so I can't tell
    Bret> if the source version I found (1.14.6) is newer or older.

    Bret> Not looking for a handout, just a pointer :-).  How have you
    Bret> handled this in the past (besides executing /bin/tclsh
    Bret> <script> from the cmd line)?

    Bret> Thanks,

    Bret> Bret

    Bret> ______________________________________________________________________________
    Bret> Bret A. Schuhmacher Email: bas AT wn DOT com Technical Director,
    Bret> WebNet Technologies WWW: http://www.wn.com Voice/Fax: (214)
    Bret> 821-0848 Pager: (214) 816-0283

    Bret>               If you didn't get caught, did you really do
    Bret> it?
    Bret> ______________________________________________________________________________

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

    Bret> --

    David Jeffers	    
<jeffers AT redrose DOT net>

-
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