[Bug 1047324] [NEW] dash globbing fails to obey ^
D J Gardner
somloieater at gmail.com
Fri Sep 7 12:29:28 UTC 2012
Public bug reported:
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
** Affects: dash (Ubuntu)
Importance: Undecided
Status: New
--
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:
New
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