I have been trying to edit my environment variables. I referred to the sites but its not working. I should mention that I am very new to Mac and I'm using it because my workplace has it. When I enter the command
touch ~/.bash_profile; open ~/.bash_profile
in the Terminal, it says
-bash: touch: command not found
-bash: open: command not found
though it did open the file once before.
echo $PATH
print? The path variable contains a list of places to search for ‘touch’ and ‘open’, so if it’s missing or invalid your shell won’t be able to find these commands.touch
is used to set the modification and access times of a file and if it doesn't exist creates it. Out of curiosity, where (the referred sites) did you get instructions to use that command and secondly, you said it opened it before - what changes did you make (I'm assuming you used Text Editor as it would be the default)?touch
. Use this command from terminal:xcode-select --install
(it is free).