Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: X-Originating-Email: [arashp AT hotmail DOT com] X-Sender: arashp AT hotmail DOT com From: "Arash Partow" To: cygwin AT cygwin DOT com Subject: Possible bash incompatibility Date: Mon, 18 Apr 2005 07:57:32 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed 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/