I have a bash script which must call another bash script which varies per-user in order to get some configuration information, like so:
somescript:
#!/bin/bash
${HOME}/.ssconfig
echo "Hello, ${VARIABLE}!"
~/.ssconfig
#!/bin/bash
VARIABLE=world
Which, instead of giving me Hello, world!
as expected, gives me Hello, !
How can I pass variables up from a script to the one that called it?
. ${HOME}/.ssconfig
, orsource ${HOME}/.ssconfig
. – muru Jul 09 '14 at 18:06