[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How does quote removal work with alternative forms of parameter expa
From: |
Philippe Cerfon |
Subject: |
Re: How does quote removal work with alternative forms of parameter expansion? |
Date: |
Sun, 26 May 2024 18:34:27 +0200 |
On Sun, May 26, 2024 at 6:18 PM Philippe Cerfon <philcerf@gmail.com> wrote:
> But now, using one of the :- :+ etc forms:
> x | invocation | output
> x="${1:-$bar}" | bash x.sh "" | expanded
> x="${1:-"$bar"}" | bash x.sh "" | expanded
> x="${1:-'$bar'}" | bash x.sh "" | 'expanded' => why not quote
> removal, why expansion?
> x="${1:-$'$bar'}" | bash x.sh "" | expanded => why expansion?
> x="${1:-\$bar}" | bash x.sh "" | $bar
> x=${1:-$bar}" | bash x.sh "" | expanded
> x="${1:-"$bar"} | bash x.sh "" | expanded
Those two should have been without the lone outer ", that is:
x=${1:-$bar} | bash x.sh "" | expanded
x=${1:-"$bar"} | bash x.sh "" | expanded
> x=${1:-'$bar'} | bash x.sh "" | $bar
> x=${1:-$'$bar'} | bash x.sh "" | $bar
> x=${1:-\$bar} | bash x.sh "" | $bar
- How does quote removal work with alternative forms of parameter expansion?, Philippe Cerfon, 2024/05/26
- Re: How does quote removal work with alternative forms of parameter expansion?,
Philippe Cerfon <=
- Re: How does quote removal work with alternative forms of parameter expansion?, Greg Wooledge, 2024/05/26
- Re: How does quote removal work with alternative forms of parameter expansion?, Philippe Cerfon, 2024/05/26
- Re: How does quote removal work with alternative forms of parameter expansion?, Greg Wooledge, 2024/05/26
- Re: How does quote removal work with alternative forms of parameter expansion?, Philippe Cerfon, 2024/05/26
- Re: How does quote removal work with alternative forms of parameter expansion?, Greg Wooledge, 2024/05/26
- Re: How does quote removal work with alternative forms of parameter expansion?, Lawrence Velázquez, 2024/05/26
- Re: How does quote removal work with alternative forms of parameter expansion?, Philippe Cerfon, 2024/05/26
- Re: How does quote removal work with alternative forms of parameter expansion?, Lawrence Velázquez, 2024/05/26
- Re: How does quote removal work with alternative forms of parameter expansion?, Philippe Cerfon, 2024/05/26
- Re: How does quote removal work with alternative forms of parameter expansion?, Lawrence Velázquez, 2024/05/26