Problem with Bash regex test case sensitivity
Lee Rothstein
lee@veritech.com
Fri Dec 3 22:32:00 GMT 2010
Having some problems with bash case-sensitive regexes, so I wrote
this little test.
t_regex
--------
#!/bin/bash
# t_regex: Test test regex
# By Lee Rothstein, 2010-12-03, 16:27:38
if [[ "$1" =~ [A-Z] ]] ; then
echo Contains Capital Letters: $1
else
echo Doesn\'t Contain Capital Letters: $1
fi
--
# Good
$ t_regex 890
Doesn't Contain Capital Letters: 890
# Good
$ t_regex DFGH
Contains Capital Letters: DFGH
# Good
$ t_regex Dfgh
Contains Capital Letters: Dfgh
# WTF, O
$ t_regex dfgh
Contains Capital Letters: dfgh
--
Do I have some Bash or Cygwin parameter set that engenders case
insensitivity? Or, is this a bug? Or, am I being overly sensitive?
;-)
Note:
--
$ echo $CYGWIN
tty title nodosfilewarning glob:noignorecase winsymlinks ntsec
--
And, oh yes, I tested this on Linux, and it works fine.
Thanks,
cygcheck output is attached
Lee
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck-hvscr+2010-12-03+16-39-42.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20101203/797b4292/attachment.txt>
-------------- next part --------------
--
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
More information about the Cygwin
mailing list