> On Jul 7, 2021, at 10:38 PM, lisa-as...@perso.be wrote: > > Correct. How do others customarily use `${fdir:=$PWD}` ?
The common idiom is : "${fdir:=$PWD}" The ':' utility is used because it does nothing, but its arguments are expanded as usual. > I'd rather understand what's going on, rather than simply never use it. Think about what is happening here: fdir=${fdir:=$PWD} This is conceptually equivalent to if [[ -z "$fdir" ]]; then fdir="$PWD" fi fdir="$fdir" I hope you can see why this is a pointless thing to do. -- vq