Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14522 > unrolled thread

Nested extglob outputs "." ".."

Started byMichal Pesa <pesathem@gmail.com>
First post2018-08-22 09:57 +0200
Last post2018-08-22 09:57 +0200
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug


Contents

  Nested extglob outputs "." ".." Michal Pesa <pesathem@gmail.com> - 2018-08-22 09:57 +0200

#14522 — Nested extglob outputs "." ".."

FromMichal Pesa <pesathem@gmail.com>
Date2018-08-22 09:57 +0200
SubjectNested extglob outputs "." ".."
Message-ID<mailman.5395.1534925236.1292.bug-bash@gnu.org>
Hello, I have encountered a strange behavior of nested extended globs:

$ echo *
0000.txt 000.txt 00.txt 0.txt a.txt b.txt c.txt
$ echo !(0.txt)
0000.txt 000.txt 00.txt a.txt b.txt c.txt
$ echo !(+(0).txt)
. .. a.txt b.txt c.txt

The last example correctly excludes the files but why are "." ".." being 
printed?

Thank you for your time.

Configuration Information:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' 
-DSHELL -DHAVE_$
uname output: Linux pish-lub 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 
15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.4
Patch Level: 19
Release Status: release

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web