Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Nov 2011 02:10:22 +0000
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        Jilles Tjoelker <jilles@stack.nl>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r227366 - in head/etc: . rc.d
Message-ID:  <20111110021022.GC43300@FreeBSD.org>
In-Reply-To: <20111109213127.GB29992@stack.nl>
References:  <201111082302.pA8N2Wmj053356@svn.freebsd.org> <20111109014916.GA75862@FreeBSD.org> <20111109213127.GB29992@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 09, 2011 at 10:31:27PM +0100, Jilles Tjoelker wrote:
> Shell patterns are different from regular expressions.

I suspected something like this, yes...

> In SUSv4, XCU 2.13 Pattern Matching Notation describes shell patterns.
> In particular, the role of the '^' to negate a bracket expression is
> instead fulfilled by '!'; a '^' directly after the '[' produces
> unspecified results (so that the common RE-like behaviour is allowed).
> Historically, this is because the Bourne shell interprets '^' as a
> synonym for '|' (pipe) and therefore it cannot occur in a pattern
> unquoted.

Thanks for the explanation.  Always wanted to try using ^ as pipe, but all
modern shells seem to not support it anymore.

./danfe



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111110021022.GC43300>