This is the mail archive of the
cygwin
mailing list for the Cygwin project.
bash string-operator problem
- From: "Rockefeller, Harry" <Harry dot Rockefeller at flightsafety dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Thu, 21 Feb 2019 16:00:11 +0000
- Subject: bash string-operator problem
CYGWIN_NT-6.1 HARRYR-PC 3.0.0(0.336/5/3) 2019-02-16 13:21 x86_64 Cygwin
GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin)
#!/bin/bash
A="A"
B="A"
if [ $A!=$B ]; then
echo -e "not identical"
fi
if [ $A==$B ]; then
echo -e "identical"
fi
exit 0
Running this script gives
not identical
identical
Both tests are true.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple