delorie.com/archives/browse.cgi | search |
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: | <BAY20-F859F5D44AF9EA3A9E691DD6290@phx.gbl> |
X-Originating-Email: | [arashp AT hotmail DOT com] |
X-Sender: | arashp AT hotmail DOT com |
From: | "Arash Partow" <arashp AT hotmail DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Possible bash incompatibility |
Date: | Mon, 18 Apr 2005 07:57:32 +0000 |
Mime-Version: | 1.0 |
X-OriginalArrivalTime: | 18 Apr 2005 07:57:32.0493 (UTC) FILETIME=[468D37D0:01C543EC] |
X-IsSubscribed: | yes |
Hi all, Could someone tell me why the piece of bash script below is being rejected as being erroneous on cygwin but works fine on other bash's ie: linux and openbsd? my current version of bash is update (2.05b). #!/bin/bash if [ `uname -s | grep -c 'CYGWIN'` -eq "1" ]; then printf "Target platform is Win32 via CYGWIN\n"; else printf "Target platform is NOT Win32 via CYGWIN\n"; fi error message: bash-2.05b$ ./test.sh ./test.sh: line 3: [: too many arguments Target platform is NOT Win32 via CYGWIN bash-2.05b$ Regards Arash Partow __________________________________________________ Be one who knows what they don't know, Instead of being one who knows not what they don't know, Thinking they know everything about all things. http://www.partow.net -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |