I would like to set a variable inside
.bashrc to be equal to the output of a command that may return an error code.
I do not know the implications of doing such a thing. Will everything else work correctly even if this command fails?
The code in
.bashrc currently is simply:
export MYVAR=$(my_dubious_command 2>/dev/null)
Is it safe to do this?