This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

== same as = in cygwin bash, not in linux bash?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]