[Bug 1047324] Re: dash globbing fails to obey ^
D J Gardner
somloieater at gmail.com
Fri Sep 7 18:09:41 UTC 2012
Followup to my own bug... we all know globbing is not regex, but it seems posix globbing uses [!ab] not [^ab].
I've been using unix for over 20 years, and its the first time I've heard that. Oh well.
** Changed in: dash (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dash in Ubuntu.
https://bugs.launchpad.net/bugs/1047324
Title:
dash globbing fails to obey ^
Status in “dash” package in Ubuntu:
Invalid
Bug description:
Versions known to be affected: 0.5.5.1-3ubuntu2 (lucid)
0.5.7-2ubuntu2 (
In every sane shell I've ever met the glob "[^ab]*" matches everything
except files beginning with a or b.
Current versions of dash ignore the ^
(also foo[^~] only matches foo~)
For systems that have dash as /bin/sh this breaks every shell script, makefile, etc. that makes use of
such inverse sets, possibly resulting in destruction of important files. e.g.
tar -czvf ../foo.tgz *[^~] will only get the unwanted files.
Demonstration code:
$ mkdir oops ; cd oops ; touch afile bfile cfile ; dash -c 'echo [ab]*' ; dash -c 'echo [^ab]*' ;ls ; cd ..
afile bfile
afile bfile
afile bfile cfile
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/1047324/+subscriptions
More information about the foundations-bugs
mailing list