Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14153
| From | marcelpaulo@gmail.com |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | extglob patterns not expanded in -c command-strings |
| Date | 2018-05-27 20:38 -0300 |
| Message-ID | <mailman.600.1527464312.1292.bug-bash@gnu.org> (permalink) |
Configuration Information [Automatically generated, do not change]:
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_CONFIG_H -I. -I../. -I.././include -I.././lib -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/build/bash-vEMnMR/bash-4.4.18=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security
uname output: Linux monk 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 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
Description:
extglob patterns are not expanded in -c command-strings, even if extglob is set within the command-string. For instance, running:
bash -c 'shopt -s extglob; echo @(foo*|bar*)'
generates this error:
bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `shopt -s extglob; echo @(foo*|bar*)'
Repeat-By:
In a clean directory, with no files, run:
bash -c 'shopt -s extglob; echo @(foo*|bar*)'
If the extglob pattern were recognized, as there's no file in the directory, the output should be:
@(foo*|bar*)
but instead, this error is generated:
bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `shopt -s extglob; echo @(foo*|bar*)'
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
extglob patterns not expanded in -c command-strings marcelpaulo@gmail.com - 2018-05-27 20:38 -0300
csiph-web