This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Possible bash incompatibility
- From: "Arash Partow" <arashp at hotmail dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 18 Apr 2005 07:57:32 +0000
- Subject: Possible bash incompatibility
- Bcc:
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/