Your message dated Fri, 4 Dec 2015 20:18:48 +0100
with message-id <[email protected]>
and subject line Re: Bug#687922: dash: pattern match failure in case
has caused the Debian Bug report #687922,
regarding dash: pattern match failure in case
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
687922: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687922
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dash
Version: 0.5.7.3

$ dash -c 'case foo-rev0 in *-rev*[^0-9]*) echo boom;; esac'
boom

Problem seen in 0.5.5.1-3ubuntu2, still present in wheezy.  All other tested 
shells
(bas, zsh) behave as expected, only dash seems to think there is a non-numeral
somewhere after "-rev".


-- 
Yann Dirson - Bertin Technologies

--- End Message ---
--- Begin Message ---
Hi,

this is a not bug in dash; the problem is in the way the matching pattern is written: it should use `!` instead of `^` to negate the expression.

Instead of

    *-rev*[^0-9]*

one should use

    *-rev*[!0-9]*

`checkbashisms` warns about this problem:

possible bashism in test.sh line 1 ([^] should be [!])

The POSIX specs [1] say:

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. A bracket expression
starting with an unquoted <circumflex> character produces unspecified
results.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13

Regards,

--
Gioele Barabucci <[email protected]>

--- End Message ---

Reply via email to