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(
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
>
> 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(
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
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,
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