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,