That page contains the errors.
The error is
curly quotes. To work properly, bash needs
neutral quotes. Curly quotes are also called "smart quotes", but that term covers a broader range.
To see the curly quotes, here's the original command from post #5, in a large font, along with some text I typed in using neutral quotes:
Depending on what font you're seeing this in, the quotes in the first example may be curly or they may be slanted. However they appear, they're wrong. The correct quotes are the neutral ones, as shown in the 2nd example.
If you're viewing this thread on a computer, as opposed to a mobile device, you can also go back to post #5, then Zoom in (Safari's View menu), and the nature of the quotes should become apparent. Try the same thing on the brysonpayne blog website.
When you type on a US keyboard (and many others), the symbol on the key is a neutral quote. Some apps will change that to a curly quote. The ones that do usually have a menu item "Smart Quotes", which on Mac OS X is usually under:
Edit menu, Substitutions, Smart Quotes.
There's also a system-wide setting that lets you choose what to use as smart quotes:
System Preferences > Keyboard > Text > Smart Quotes
Some blog software will automatically convert neutral quotes to curly quotes. This makes ordinary text look nicer, but it's often a disaster for code, because code really does need the neutral quotes. I don't know what software the brysonpayne blog is using, but it may be doing the substitution to curly quotes. Or it may be the editing software he uses to write the blog.
As another example of a substitution that ruins code, many commands use double-hyphens, "--", to mark options. Some blog software will substitute an em-dash "—" for this, which again is fine for ordinary text but a disaster for code.
When I say "quotes" I mean double-quotes, as seen around the 4th word of this sentence, and I also mean apostrophes (single quotes), as seen in the words
don't or
can't. The bash shell uses both kinds of quotes, for different purposes.
I mention this because there's a second error on the brysonpayne blog, in this code:
echo export PATH=’/usr/local/bin:$PATH’ >> ~/.bash_profile
I've shown it in a large font, so the curly or slanted single-quotes will be more apparent. The correct form is:
echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile
Again, it's in a large font to show the neutral single quotes more clearly.
I suspect this command is what caused the fatal failure, when all the Terminal commands stopped working, because it wrecked PATH. When done with curly quotes, this will write an erroneous command to the bash profile file. Part of this wreckage can be seen in the last line of the 'cat' command's output in post #27.
There is an example on the blog's web page of
correct neutral single quotes. It's in the comments section, discussing the raw_input function. The code example appears in a monospaced font, and the neutral single quotes are correctly rendered.
I recommend posting a comment at the blog site, describing the problems you had with curly quotes, and asking the professor to fix the errors on that page. You can provide a link to this thread rather than trying to explain it all again.