[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: parameter expansion with `:` does not work
From: |
Kerin Millar |
Subject: |
Re: parameter expansion with `:` does not work |
Date: |
Thu, 8 Jul 2021 02:51:15 +0100 |
On Thu, 8 Jul 2021 02:54:06 +0200 (CEST)
lisa-asket@perso.be wrote:
> As I was in it, have also changed
>
>
>
> fdir=${fdir:-$PWD}
This makes sense.
>
>
>
> to
>
>
>
> fdir=${fdir:=$PWD}
Here, you are using a form of parameter expansion that intrinsically performs
variable assignment, only to redundantly assign the result of the expansion to
the same variable once again. In a roundabout fashion, it ends up proving
Greg's point. I'd suggest temporarily disavowing yourself of the
${parameter:=word} form, for the time being.
--
Kerin Millar
- parameter expansion with `:` does not work, (continued)
- Re: parameter expansion with `:` does not work, Greg Wooledge, 2021/07/07
- parameter expansion with `:` does not work, lisa-asket, 2021/07/07
- Re: parameter expansion with `:` does not work, Chet Ramey, 2021/07/07
- parameter expansion with `:` does not work, lisa-asket, 2021/07/07
- Re: parameter expansion with `:` does not work, Dennis Williamson, 2021/07/07
- Re: parameter expansion with `:` does not work, Greg Wooledge, 2021/07/07
- Re: parameter expansion with `:` does not work,
Kerin Millar <=
- parameter expansion with `:` does not work, lisa-asket, 2021/07/07
- Re: parameter expansion with `:` does not work, Lawrence Velázquez, 2021/07/07
- parameter expansion with `:` does not work, lisa-asket, 2021/07/08
- Re: parameter expansion with `:` does not work, Greg Wooledge, 2021/07/07
- parameter expansion with `:` does not work, lisa-asket, 2021/07/08