Bash, by itself, will not create files like this. These files are probably created by you accidentally through incorrect typing/pasting of commands.
You can remove the files using rm:
rm '()' '()!'
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
Based on what you did so far: