[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: whats the bash opt to make ${var//# and % /replacement} work ?
From: |
alex xmb sw ratchev |
Subject: |
Re: whats the bash opt to make ${var//# and % /replacement} work ? |
Date: |
Fri, 27 Sep 2024 08:56:20 +0200 |
ohh .. right !
thxx
greets
On Thu, Sep 26, 2024 at 7:16 PM Greg Wooledge <greg@wooledge.org> wrote:
> 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.
>
>