[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: whats the bash opt to make ${var//# and % /replacement} work ?
From: |
Greg Wooledge |
Subject: |
Re: whats the bash opt to make ${var//# and % /replacement} work ? |
Date: |
Thu, 26 Sep 2024 13:15:27 -0400 |
On Thu, Sep 26, 2024 at 18:51:53 +0200, alex xmb sw ratchev wrote:
> well , i tried shortening code , but ye it didnt work
>
> set 1 2 3
>
> i tried ${@//#/blabla} to prepend something , but it didnt work
hobbit:~$ set -- 1 2 3
hobbit:~$ printf '<%s> ' "${@/#/q}"; echo
<q1> <q2> <q3>
Don't use the // double slashes here. Just a single slash.