[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bash Shell Parameter Expansion
From: |
tolugboji |
Subject: |
Bash Shell Parameter Expansion |
Date: |
Sat, 09 Oct 2021 23:25:34 +0000 |
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Saturday, October 9th, 2021 at 11:09 PM, Alex fxmbsw7 Ratchev
<fxmbsw7@gmail.com> wrote:
> you may be not reading the man bash to your version ?
I am reading from the site which should be the latest descriptions
https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
> a means b
>
> - means str appears when var is unset ( never used yet )
>
> - means str appears when var is set already
>
> :- means str if unset or empty
>
> :+ str if set or empty
>
> .. hmm im not sure atm..
Reading more carefully, the omitting the colon case is described. There is a
lot
one can do with parameter expansion.
Have seen that fontify=${st:+"no"} results in an empty value for fontify (when
st is unset),
even when fontify was previously assigned.
> On Sun, Oct 10, 2021, 00:58 tolugboji tolugboji@protonmail.com wrote:
>
> > Some bash implementations mention ${PARAMETER-WORD} and
> >
> > ${PARAMETER+WORD}. But these are not mentioned
> >
> > in the gnu bash manual? Is this because they are not implemented in gnu
> >
> > bash?
- Re: Bash Shell Parameter Expansion, (continued)
- Re: Bash Shell Parameter Expansion, Alex fxmbsw7 Ratchev, 2021/10/09
- Bash Shell Parameter Expansion, tolugboji, 2021/10/09
- Re: Bash Shell Parameter Expansion, Alex fxmbsw7 Ratchev, 2021/10/09
- Re: Bash Shell Parameter Expansion, Chet Ramey, 2021/10/09
- Re: Bash Shell Parameter Expansion, tolugboji, 2021/10/09
- Re: Bash Shell Parameter Expansion, Alex fxmbsw7 Ratchev, 2021/10/09
- Bash Shell Parameter Expansion, tolugboji, 2021/10/09
- Bash Shell Parameter Expansion, tolugboji, 2021/10/09
- Bash Shell Parameter Expansion, tolugboji, 2021/10/09
- Re: Bash Shell Parameter Expansion, Alex fxmbsw7 Ratchev, 2021/10/09
- Bash Shell Parameter Expansion,
tolugboji <=
- Re: Bash Shell Parameter Expansion, Alex fxmbsw7 Ratchev, 2021/10/09
- Re: Bash Shell Parameter Expansion, Greg Wooledge, 2021/10/09
- Re: Bash Shell Parameter Expansion, Lawrence Velázquez, 2021/10/09
- Bash Shell Parameter Expansion, tolugboji, 2021/10/09
Bash Shell Parameter Expansion, tolugboji, 2021/10/09