delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/06/05/02:47:46

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <af0faace0906042335m1f9ccfa5k249c99dcc735c5e@mail.gmail.com>
References: <af0faace0906042335m1f9ccfa5k249c99dcc735c5e AT mail DOT gmail DOT com>
Date: Fri, 5 Jun 2009 02:47:28 -0400
Message-ID: <f60fe000906042347o70de0315o5c78520302f5f64d@mail.gmail.com>
Subject: Re: Re: Why bash failed to match this pattern?
From: "Mark J. Reed" <markjreed AT gmail DOT com>
To: Pan ruochen <panruochen AT gmail DOT com>
Cc: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Fri, Jun 5, 2009 at 2:35 AM, Pan ruochen
> But some bash does match the pattern:

It's possible that the behavior has changed between bash versions, but
the behavior is not Cygwin-specific.  3.2.17 on OS X also suppresses
metacharacters with quotation marks, and the documentation indicates
that this is the expected behavior. See

http://www.gnu.org/software/bash/manual/bashref.html#Conditional-Constructs

Under [[...]],  third paragraph: "An additional binary operator, =E2=80=98=
=3D~=E2=80=99,
is available [...] Any part of the pattern may be quoted to force it
to be matched as a string."




> $bash --version
> GNU bash, version 3.2.33(1)-release (i386-redhat-linux-gnu)
> Copyright (C) 2007 Free Software Foundation, Inc.
>
> Maybe some settings affect bash's behaviour.
>
> PRC
>



--=20
Mark J. Reed <markjreed AT gmail DOT com>

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019