delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/09/07:42:50

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-Apparently-From: <earnie?boyd AT yahoo DOT com>
Message-ID: <3AA8CFB3.4B515116@yahoo.com>
Date: Fri, 09 Mar 2001 07:42:27 -0500
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: cygwin AT cygwin DOT com
X-Mailer: Mozilla 4.76 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Ralf Fassel <ralf AT akutech DOT de>
CC: bug-bash AT gnu DOT org, cygwin AT cygwin DOT com
Subject: Re: different behaviour of bash and sh
References: <15015 DOT 59568 DOT 965521 DOT 675165 AT jupiter DOT akutech-local DOT de>

In the Cygwin release

sh != bash
sh == ash

Earnie.

Ralf Fassel wrote:
> 
> Configuration Information [Automatically generated, do not change]:
> Machine: i686
> OS: cygwin
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H   -I.  -I../src -I../src/include -I../src/lib -I/src/bash/distro/usr/include -g -O2
> uname output: CYGWIN_NT-4.0 MARS 1.1.8(0.34/3/2) 2001-01-31 10:08 i686 unknown
> Machine Type: i686-pc-cygwin
> 
> Bash Version: 2.04
> Patch Level: 7
> Release Status: release
> 
> Description:
> The following script behaves differently in bash and sh:
> 
>     % cat script
>     #!/bin/sh --
>     checkstat() {
>         echo $?
>     }
>     false
>     checkstat
>     # End of file
> 
> Repeat-By:
> 
>     $ type bash
>     bash is /usr/bin/bash
>     $ bash script
>     1
>     $ type sh
>     sh is /usr/bin/sh
>     $ sh script
>     0
> 
> The 0 is wrong IMHO, it should be 1.  (Even HP with their BD-/bin/sh
> returns 1).
> 
> R'
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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