All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martijn Dekker <martijn@inlv.org>
To: dash@vger.kernel.org
Cc: Adam Endrodi <adam.endrodi@nokia.com>
Subject: Re: "case" bug in dash
Date: Wed, 02 Mar 2016 22:18:44 +0100	[thread overview]
Message-ID: <56D758B4.6000005@inlv.org> (raw)
In-Reply-To: <20160302210914.GC1056@timmy>

Adam Endrodi schreef op 02-03-16 om 22:09:
> The following program prints "boo" incorrectly (I'm trying to match
> non-numbers):

That's correct. In shell glob pattern bracket expressions, the standard
negator is '!' and not '^'. Many shells support '^' as a synonym, but
that's an extension to the standard and not mandatory. Dash usually
doesn't support such extensions. But all shells support '!', so just
that instead and you're safe.

Reference:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13
"If an open bracket introduces a bracket expression as in XBD RE Bracket
Expression, except that the <exclamation-mark> character ( '!' ) shall
replace the <circumflex> character ( '^' ) in its role in a non-matching
list in the regular expression notation, it shall introduce a pattern
bracket expression."

- M.


      reply	other threads:[~2016-03-02 21:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02 21:09 "case" bug in dash Adam Endrodi
2016-03-02 21:18 ` Martijn Dekker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56D758B4.6000005@inlv.org \
    --to=martijn@inlv.org \
    --cc=adam.endrodi@nokia.com \
    --cc=dash@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.