bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Nested extglob outputs "." ".."


From: Michal Pesa
Subject: Nested extglob outputs "." ".."
Date: Wed, 22 Aug 2018 09:57:19 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]