delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/31/12:53:12

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Authentication-Warning: hp2.xraylith.wisc.edu: khan owned process doing -bs
Date: Wed, 31 Jan 2001 11:17:56 -0600 (CST)
From: Mumit Khan <khan AT NanoTech DOT Wisc DOT EDU>
To: Josifovski Ljubomir-BLJ01Z <BLJ01Z AT motorola DOT com>
cc: "Cygwin Mailing List (E-mail)" <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: [OT] #!/usr/bin/env bash -vx
In-Reply-To: <D1F0002F0A8FD411ACEC00805FE675CE260F22@zuk02exm02.comm.mot.com>
Message-ID: <Pine.HPP.3.96.1010131111628.4497d-100000@hp2.xraylith.wisc.edu>
MIME-Version: 1.0

On Wed, 31 Jan 2001, Josifovski Ljubomir-BLJ01Z wrote:

> 
> This is not exclusive to cygwin, but maybe someone here can help me. I put
> 
> #!/usr/bin/env bash
> 
> in the first line on some scripts I use on Cygwin, Linux and HP-UX because
> the exact path to bash differs (someone posted this trick on the list
> sometime ago). But when arguments are added to the line, like
> 
> #!/usr/bin/env bash -vx
> 
> this doesn't work anymore - I get:

It's the way env works, especially in conjunction with '#!'. If you
really want to do this, create a wrapper script, where you can define
all the flags. In this example, the interpreter Cygwin or Linux or any
other OS will call up is "bash -vx", which is it not a valid interpreter
name ("bash" by itself is of course).

Regards,
Mumit



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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