Re: Bash string substitution bug (?)

2008-01-12 Thread Dmitry V Golovashkin
Thanks a lot! :-) Chet Ramey wrote: Bernd Eggink wrote: Chet Ramey schrieb: Bernd Eggink wrote: prompt: CLUSTER='1 2'; echo ${CLUSTER/${HOSTNAME/.*}} output: -bash: ${HOSTNAME: bad substitution Apparently bash interprets this as ${parameter

Re: Bash string substitution bug (?)

2008-01-11 Thread Dmitry V Golovashkin
either VALUE=host1.blah.com echo ${VALUE//.*} or echo ${VALUE/.*} is accepted by Bash and works exactly as I would expect it - meaning it correctly produces "host1" - removes the dot (dot is just a character - we are not in the regular expression world) - so the dot and the tr

Bash string substitution bug (?)

2008-01-11 Thread Dmitry V Golovashkin
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: x86_64-redhat-linux-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDI