I used to do this:
declare -g var='value'
. ~script.sh sub
and my var was available to read and modify from within my sub.
Now I have a binary instead of script.sh and I want the same functionality.
Of course, now I cannot do . ~/script.bin sub because bash 'cannot execute binary file'
Instead I have to :
declare -g var='value'
~/script.bin sub
How do I get ~/script.bin sub to read/modify my var?
I tried also:
declare -gx var='value' and export var='value' but no cookie.
var=$(script.bin bin).