delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/24/08:26:01

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
From: "Gerald S. Williams" <gsw AT agere DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: "==" operand not found
Date: Thu, 24 Oct 2002 08:25:21 -0400
Message-ID: <GBEGLOMMCLDACBPKDIHFEEBBCMAA.gsw@agere.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal
In-Reply-To: <7BFCE5F1EF28D64198522688F5449D5AD63A6D@xchangeserver2.storigen.com>

Scott Prive wrote:
> 1) Why is ash the default? At least on UNIX systems that use "true"
>    sh -- usually just /bin/bash in /bin/sh compatibility mode

But bash in compatibility mode isn't true Bourne shell. For
instance, /bin/sh on a Solaris box doesn't support the "=="
operator either.

This is a case where ASH is doing the right thing. If you
put #!/bin/sh at the beginning of your script, you should
only use pure Bourne shell commands. You'd do better with
#!/usr/bin/bash instead. Or if bash isn't in /usr/bin on
your Unix boxes, there may be some trick using #!/bin/sh
along with a conditional exec (similar to the trick used
in many Tcl scripts), but I'd have to think about it.

-Jerry Williams

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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