In a bash script, I'm assigning a local variable so that the value depends on an external, global environment variable ($MYAPP_ENV
).
if [ "$MYAPP_ENV" == "PROD" ]
then
[email protected]
else
[email protected]
fi
Is there a shorter (yet clean) way to write the above assignment? (Presumably using some kind of conditional operator / inline if.)