I'm trying to use some script variables in a BASH script to make my code clearer.
However, for some reason, my variables are not being expanded/used.
Nothing happens when I use the variable with the full command spelled out
This is the script I made :
command1=$SOMEPATH/abc.sh
command2=$SOMEPATH/def.sh input
command3=$SOMEPATH/ghi
gnome-terminal \
--tab -t "Server 1" -e 'bash -c "export BASH_POST_RC=\"$command1\"; exec bash"' \
--tab -t "Server 2" -e 'bash -c "export BASH_POST_RC=\"$command2"; exec bash"' \
--tab -t "Server 3" -e 'bash -c "export BASH_POST_RC=\"$command3"; exec bash"'
Thanks for any tips
command2="$SOMEPATH/def.sh input"