I have a shell script that includes a util script via a library-include
function.
The library-include function allows me to source a library file
that is in a relative path off of PATH (a feature not in bash,
unfortunately).
What I just noticed was a problem where the included file has
local da
Hello!
> Is there a T/F var expansion that does:
>
> var=${tst:+$yes}${tst:-$no}
>
> but with yes/no in 1 expansion?
At least if you are only working with numbers you can use
((var=(tst!=0?42:31)))
But is this a question for bug-bash?
Best regards,
Martin
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 '!' b