[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
extglob breaks when it's inside a bash function
From: |
Jelle de Jong |
Subject: |
extglob breaks when it's inside a bash function |
Date: |
Wed, 01 Aug 2007 17:40:37 +0200 |
User-agent: |
Thunderbird 1.5.0.12 (X11/20070604) |
Configuration Information
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
-DCONF_OSTYPE='lin$
uname output: Linux xubuntu-ubuntu 2.6.20-16-386 #2 Thu Jun 7 20:16:13
UTC 2007$
Machine Type: i486-pc-linux-gnu
Bash Version: 3.2
Patch Level: 13
Release Status: release
Description:
when using extglob inside a bash subshell it breaks,
I tested it with several members in #bash and they have the same problem
quote #bash:
greycat: (Now that I know the bug is in *functions* specifically, I can
confirm that it's not isolated to bash 3.2.*. It also occurs in 2.05b
for example.)
Best regards,
Jelle de Jong
PowerCraft Technology
T: +3110 707 9913
M: +316 1218 2441
E: jelledejong@powercraft.nl
#!/bin/bash
foo()
{
shopt -s extglob
mkdir /tmp/abacab
cd /tmp/abacab || exit 1
touch foo.gz bar.gz foo.txt
echo !(*.gz)
}
foo
# bash -x chmod +x test.sh; ./test.sh
# ./test.sh: line 9: syntax error near unexpected token `('
# ./test.sh: line 9: ` echo !(*.gz)'
test.sh
Description: application/shellscript
- extglob breaks when it's inside a bash function,
Jelle de Jong <=