I have a bunch of scripts that rely on variables that are exported in .bash_profile and now the scripts are not able to access those exported variables. Not sure if something changed or I did something.
Here is and example of what was working
in .bash_profile
...
export GUIEDITOR="sublime_text"
...
in myscript
...
if (( ${GUIEDITOR-1} )); then
Editor=$GUIEDITOR
else
Editor="gedit"
fi
...
would start the sublime editor. BUT now it starts the gedit editor. I put some echo statements into the script and sure enough $GUIEDITOR is not set or defined. At the bash prompt an "echo $GUIEDITOR" shows "sublime_text". Also should say that $GUIEDITOR works fine in my .bashrc aliases and functions.
Like I said this did work fine and now doesn't. Anyone able to tell me what is wrong? Or maybe I'm doing something strange. Any help appreciated!
Here is and example of what was working
in .bash_profile
...
export GUIEDITOR="sublime_text"
...
in myscript
...
if (( ${GUIEDITOR-1} )); then
Editor=$GUIEDITOR
else
Editor="gedit"
fi
...
would start the sublime editor. BUT now it starts the gedit editor. I put some echo statements into the script and sure enough $GUIEDITOR is not set or defined. At the bash prompt an "echo $GUIEDITOR" shows "sublime_text". Also should say that $GUIEDITOR works fine in my .bashrc aliases and functions.
Like I said this did work fine and now doesn't. Anyone able to tell me what is wrong? Or maybe I'm doing something strange. Any help appreciated!