Setting up execution path in Terminal
Are you copying the dollar sign into terminal?  The dollar sign in writing, like in the document, is just a sign that it is on a new terminal line.

You can copy and paste these commands into terminal and it should work. I just tried it on my machine

echo 'export PATH=$PATH:$HOME/bin' &gt;&gt; ~/.bash_profile


or

echo 'export PATH=$PATH:/usr/local/bin' &gt;&gt; ~/.bash_profile


Then you can verify that they have worked by typing in this command

cat ~/.bash_profile


And you should see

export PATH=$PATH:$HOME/bin


or

export PATH=$PATH:/usr/local/bin


Depending on which one you used.

If you want the changes to also be applied to the currently running shell, you need to run

. ~/.bash_profile


as well.