On Jul 16, 2:26pm, Sepp Tannhuber wrote: } } my_variable="${$([[ -w $PWD ]] || echo 0):+my_value}" Perhaps: [[ -w $PWD ]] && my_variable='' || my_variable="my_value"