delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/11/01/08:05:22

From: bas AT wn DOT com ("Bret A. Schuhmacher")
Subject: Re: what did I miss? #!.... doesn't work in bash
1 Nov 1996 08:05:22 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <Pine.LNX.3.91.961101090444.5849C-100000.cygnus.gnu-win32@webnet.wn.com>
Mime-Version: 1.0
Original-To: James Dumser <dumser AT lesol1 DOT dseg DOT ti DOT com>
Original-cc: David Jeffers <jeffers AT redrose DOT net>, gnu-win32 AT cygnus DOT com
In-Reply-To: <199611011413.IAA10021@lesol1.dseg.ti.com>
Original-Sender: owner-gnu-win32 AT cygnus DOT com

On Fri, 1 Nov 1996, James Dumser wrote:

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

Thank you!  I thought I was being dense - no he *didn't* answer my 
question. :-).

I found out the MKS korn shell has an environment variable called 
HASHBANG that, when set to 1, will allow this to work.  I may have to 
use that. :-(

Bret

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

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

-
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