Is there a T/F var expansion that does: var=${tst:+$yes}${tst:-$no} but with yes/no in 1 expansion?
Something like: var=${tst:^yes^no} | | \___\___ or some other char(s) with the opposite syntax being allowed as var=${!tst:^no^yes} (or) if '!' before the varname is unwieldy: var=${tst:!no!yes} ---- Obviously the 1 code-snippet solves the problem, but looks a bit redundant, at the least... Sorry if this is already implemented in some form, I'm just not remembering there being one.