Do you have a ~/.bash_profile
? If so, then that will be preferred over the ~/.profile
startup script. Next, verify the setting of your path (echo $PATH
). Also (and this may be a dumb question) are you actually logged in as GuardDog_02? In other words, is ~
identical to /Users/GuardDog_02
?
Modify the file .bash_profile with nano or another appropriate editor:
Replace:
export PATH=’/usr/local/bin:??
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
by:
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
export PATH=/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH
Explanation:
The first line of your current .bash_profile
export PATH=’/usr/local/bin:??
modifies the standard value of $PATH given by /etc/paths from
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
to ’/usr/local/bin:??
- which is no valid path.
The fourth and fifth line of your current .bash_profile modifies $PATH to
/Library/Frameworks/Python.framework/Versions/2.7/bin:’/usr/local/bin:??
Since ’/usr/local/bin:?
is no valid path the finally effective PATH is
/Library/Frameworks/Python.framework/Versions/2.7/bin
which completely breaks your standard PATH. You can still execute all executables in the above directories but you can't omit the superior directories (e.g. to execute nano you have to enter /usr/bin/nano
instead of nano
).
Best Answer
Well,
$HOSTNAME
is a variable, and if you just write it on a single line and press enter, bash will simply replace it with the respective value, i.e. "TEST.local". Since "TEST.local" is not a valid command, bash will complain.If you want to print the value of any bash variable, you should use
echo
, i.e.echo $HOSTNAME
.For a quick bash scripting tutorial regarding variables, see here for example.