delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/27/17:09:24

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
Message-ID: <20010427195113.1138.qmail@web3303.mail.yahoo.com>
Date: Fri, 27 Apr 2001 12:51:13 -0700 (PDT)
From: Tom Dorgan <tdorgan AT yahoo DOT com>
Subject: == same as = in cygwin bash, not in linux bash?
To: cygwin AT cygwin DOT com
MIME-Version: 1.0

hello,

I recently backported some bash scripts developed on cygwin to linux.
to my surprise I got an interpretation error on a few of them. here's a
sample:
#!/bin/bash
if [ "$1" == "" ]; then
  while [ -z "$INSTALL_DOMAIN" ] ; do
      echo -n "Enter server web domain name: " ;
      read INSTALL_DOMAIN ;
  done
else
  INSTALL_DOMAIN="$1"
fi

this works on cygwin bash (latest fix) but gives:
t.sh: [: ==: binary operator expected 
on linux.

my Oreilly 'Learning the bash shell' book says that using == is a
common beginner mistake. I was wondering about this.....


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.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