[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BUG about quote removal inside parameter expansion.
From: |
TobiX |
Subject: |
BUG about quote removal inside parameter expansion. |
Date: |
Wed, 06 Nov 2002 20:48:26 +0100 |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu'
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H -I.
-I/home/packages/bash/bash-2.05b -I/home/packages/bash/bash-2.05b/include
-I/home/packages/bash/bash-2.05b/lib -g -O2
uname output: Linux ikkoku 2.2.20 #6 Thu Jun 6 20:05:14 CEST 2002 i686 AMD
Athlon(tm) Processor AuthenticAMD GNU/Linux
Machine Type: i386-pc-linux-gnu
Bash Version: 2.05b
Patch Level: 0
Release Status: release
Description:
This bug is about quote removal inside parameter expansion.
The one I experienced the bug with is the substitution one:
${variable/pattern/string}
${variable//pattern/string}
but AFAIK other parameter expansions could have the same problem.
1st bug: (documentation bug) It's not clear which quotes or
expansions can be performed inside the pattern and the
string parts.
2nd bug: (real bug) If some of them are tried, they generally
work, but THE QUOTES AREN'T REMOVED. See the example
below.
Repeat-By:
Try this line:
hello=world; echo "${hello//r/$'\t'}"
If $'...' quoting were to be performed, the output shuld be:
wo ld
Elsewhere, if that quoting were not to be performed, it shuld be:
wo$'\t'ld
Here is the bug: the substitution is performed, but the quotes
aren't removed. In fact the true output is this:
wo' 'ld
which has no meaning.
- BUG about quote removal inside parameter expansion.,
TobiX <=