From: Adam Endrodi <adam.endrodi@nokia.com>
To: dash@vger.kernel.org
Subject: "case" bug in dash
Date: Wed, 2 Mar 2016 22:09:14 +0100 [thread overview]
Message-ID: <20160302210914.GC1056@timmy> (raw)
Hi,
The following program prints "boo" incorrectly (I'm trying to match
non-numbers):
"""
#!/bin/dash
case "111" in
*[^0-9]*)
echo boo;;
esac
"""
File expansion seems to be affected too:
/tmp/dash/src $ touch 111
/tmp/dash/src $ ./dash -c 'echo *[^0-9]*'
111 dash.1
/tmp/dash/src $ bash -c 'echo *[^0-9]*'
alias.c alias.h alias.o arith_yacc.c arith_yacc.h arith_yacc.o arith_yylex.c arith_yylex.o bltin builtins.c builtins.def builtins.def.in builtins.h builtins.o cd.c cd.h cd.o dash dash.1 error.c error.h error.o eval.c eval.h eval.o exec.c exec.h exec.o expand.c expand.h expand.o funcs histedit.c histedit.o init.c init.h init.o input.c input.h input.o jobs.c jobs.h jobs.o machdep.h mail.c mail.h mail.o main.c main.h main.o Makefile Makefile.am Makefile.in memalloc.c memalloc.h memalloc.o miscbltin.c miscbltin.h miscbltin.o mkbuiltins mkinit mkinit.c mknodes mknodes.c mksignames mksignames.c mksyntax mksyntax.c mktokens myhistedit.h mystring.c mystring.h mystring.o nodes.c nodes.c.pat nodes.h nodes.o nodetypes options.c options.h options.o output.c output.h output.o parser.c parser.h parser.o
printf.o redir.c redir.h redir.o shell.h show.c show.h show.o signames.c signames.o syntax.c syntax.h syntax.o system.c system.h system.o test.o times.o token.h token_vars.h TOUR trap.c trap.h trap.o var.c var.h var.o
Tried with 2e5842258bd5b252ffdaa630db09c9a19a9717ca (current git master)
both with --enable-glob and --disable-glob.
--
adam
next reply other threads:[~2016-03-02 21:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 21:09 Adam Endrodi [this message]
2016-03-02 21:18 ` "case" bug in dash Martijn Dekker
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=20160302210914.GC1056@timmy \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).