delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/31/06:50:44

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <00c301c5078b$07215240$f968dc54@I2.COM>
From: "Paolo Gesmundo" <paolo DOT gesmundo AT tiscali DOT it>
To: <cygwin AT cygwin DOT com>
References: <00b201c50767$a507e0b0$f968dc54 AT I2 DOT COM> <41FDEE90 DOT 54847D1A AT dessent DOT net>
Subject: Re: Unable to properly execute a let statement from a shell script
Date: Mon, 31 Jan 2005 12:50:14 +0100
MIME-Version: 1.0
X-IsSubscribed: yes

Thanks for the responses.

So, in cygwin for Win XP, is it possible to set my environment in such a way 
that the default shell
is bash?

Thanks
Paolo

----- Original Message ----- 
From: "Brian Dessent" <brian AT dessent DOT net>
To: <cygwin AT cygwin DOT com>
Sent: Monday, January 31, 2005 9:38 AM
Subject: Re: Unable to properly execute a let statement from a shell script


> Paolo Gesmundo wrote:
>
>> I know that I could modify a.sh by adding #!/bin/bash
>> at the top of the file but I would need to avoid this
>> otherwise I have to modify too many scripts
>>
>> Is there a way to run a.sh like in Case 1 and get the
>> proper result like in Case 2?
>
> It sounds like your scripts are banking on the assumption that under
> linux, sh=bash, whereas on Cygwin sh=ash.  So, you can't get away with
> using bash-isms in scripts without shebangs because you are relying on a
> specific quirk of linux.  If you require bash-specific features you need
> to either call bash explicitly in the shebang or exec the script from
> bash.  Otherwise your script is not going to be portable on any system
> other than linux.  bash != sh.
>
> Brian
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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