Have var+func sourced in a subroutine but they don't seem to end up in same scope

2019-07-28 Thread L A Walsh
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

Re: T/F var expansion?

2019-07-28 Thread Martin Schulte
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

T/F var expansion?

2019-07-28 Thread L A Walsh
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