| delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | Bash regex tests wh'appen? |
| Date: | Thu, 11 Jan 2007 16:07:27 -0000 |
| Message-ID: | <013b01c7359a$96ecb740$a501a8c0@CAM.ARTIMI.COM> |
| MIME-Version: | 1.0 |
| X-Mailer: | Microsoft Office Outlook 11 |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| 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 |
I upgraded quite a lot of bash versions in one go, and one of my
shell-scripts broke. I've reproduced it to a simple test case which shows
that either regex tests have turned into non-reg-ex text matches, or that I've
really misunderstood something here. I checked the last few release
announcements and didn't see anything about the behaviour of =~ changing.
/artimi/tools/cygwin/bin $ if [[ "foo.h" =~ "foo.h" ]] ; then echo "yes" ;
else echo "no" ; fi
yes
/artimi/tools/cygwin/bin $ if [[ "foo.h" =~ ".*foo.h" ]] ; then echo "yes" ;
else echo "no" ; fi
no
/artimi/tools/cygwin/bin $ if [[ "foo.h" =~ "\.\*foo.h" ]] ; then echo "yes" ;
else echo "no" ; fi
no
/artimi/tools/cygwin/bin $ cygcheck -c bash
Cygwin Package Information
Package Version Status
bash 3.2.9-10 OK
Reverting to 3.1-6 restores the expected behaviour (results above become
yes, yes, no).
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
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 |