How do I set a permanent environment variable (i.e. one that does not need exporting every time I start a new Terminal session) in Mac OS X 10.9? I\'ve found a number of ans
Drop the $(...) bit, which would attempt to execute the command within the brackets and set $MULE_HOME to whatever it produces. In your case /opt/mule-standalone-3.4.0 is not an executable, hence the error you are getting.
export MULE_HOME=/opt/mule-standalone-3.4.0
and use ~/.bashrc not ~/.bash_profile.
EDIT: It seems opinion is that you should set environment variables in your ~/.bash_profile script, and not ~/.bashrc script.