[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regex confusion -- not matching; think it should?

From: Greg Wooledge
Subject: Re: regex confusion -- not matching; think it should?
Date: Wed, 19 Jun 2013 12:43:49 -0400
User-agent: Mutt/

On Thu, Jun 20, 2013 at 12:39:56AM +0800, Chris Down wrote:
> On 20 June 2013 00:29, DJ Mills <address@hidden> wrote:
> > wordsplitting and pathname expansion do not occur within the
> > [[ keyword.
> $ > foo
> $ [[ foo == * ]] && echo bar
> bar

That's pattern matching, which is neither word splitting nor pathname

What DJ said was accurate, but perhaps confusing.  The *left* hand side
of an = or == or =~ operator inside [[...]] doesn't need to be quoted,
because no special things are done on the left hand side.  There are
potentially some special interpretations on the *right* hand side,
but not as many as there would be outside of [[...]].

reply via email to

[Prev in Thread] Current Thread [Next in Thread]