Re: Problem with pattern replacing when STRING is an expandable char

2007-12-13 Thread Heinz-Ado Arnolds
Mike Stroyan wrote: Repeat-By: a=111.1 echo ${a//[0-9]/x} correctly gives "xxx.x", but echo ${a//[0-9]/*} gives a listing of files in current directory. Seems that the "*" is expanded before replacing the pattern. It workes the right way at least up to bash-3.1.17(

Re: Problem with pattern replacing when STRING is an expandable char

2007-12-13 Thread Heinz-Ado Arnolds
Paul Jarc wrote: Heinz-Ado Arnolds <[EMAIL PROTECTED]> wrote: a=111.1 echo ${a//[0-9]/x} correctly gives "xxx.x", but echo ${a//[0-9]/*} gives a listing of files in current directory. Seems that the "*" is expanded before replacing the pattern. No, it's expanded afte

Re: Problem with pattern replacing when STRING is an expandable char

2007-12-12 Thread Mike Stroyan
> > Repeat-By: > a=111.1 > echo ${a//[0-9]/x} > > correctly gives "xxx.x", but > > echo ${a//[0-9]/*} > > gives a listing of files in current directory. Seems that the "*" > is expanded before replacing the pattern. > > It workes the right way at least up to bash-3.1.17(

Re: Problem with pattern replacing when STRING is an expandable char

2007-12-12 Thread Andreas Schwab
Heinz-Ado Arnolds <[EMAIL PROTECTED]> writes: > Repeat-By: > a=111.1 > echo ${a//[0-9]/x} > > correctly gives "xxx.x", but > > echo ${a//[0-9]/*} > > gives a listing of files in current directory. Only those that contain a period. > Seems that the "*" > is expanded be

Re: Problem with pattern replacing when STRING is an expandable char

2007-12-12 Thread Paul Jarc
Heinz-Ado Arnolds <[EMAIL PROTECTED]> wrote: > a=111.1 > echo ${a//[0-9]/x} > > correctly gives "xxx.x", but > > echo ${a//[0-9]/*} > > gives a listing of files in current directory. Seems that the "*" > is expanded before replacing the pattern. No, it's expanded afterward,

Problem with pattern replacing when STRING is an expandable char

2007-12-12 Thread Heinz-Ado Arnolds
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='b