Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
this is the output
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
That's a correct value. The command line should work now in Terminal windows.


Please copy & paste the following into a Terminal window:
Code:
cat ~/.bash_profile~

This will output the contents of the original profile file, the one renamed as shown in post #23. I can tell from your earlier results that this file is 200 bytes long, and was last modified on 10 Sep.

Next, copy and paste the complete output into a post here.

I'd like to determine if the problem was in this file, or whether it might have been something else.


Please tell us what the name of your computer is supposed to be.

Did you intentionally name it "hahahahahahaa"? If so, then the hostname shown by the shell prompts is correct.

If you didn't name it "hahahahahahaa", then a simple way to change it is with System Preferences.app. The hostname is shown in the Sharing pane, where you can edit it to be what you want. If you change it there, quit Terminal then relaunch it, and the new hostname should appear in the shell prompt.

You can read the hostname with these commands in Terminal:
Code:
scutil --get ComputerName
scutil --get LocalHostName
In general, the two values will be the same. If they aren't, copy and paste the complete output and post it here.


Finally, post the exact URL where you read the instructions telling you "the stupid command" you showed in post #5.

There's a subtle error in the command shown in post #5, and I want to see whether it's present in the original source, or whether it might have been caused by something on your Mac.
 
this was the output for the first command
hahahahahahaa:~ Shadow$ cat ~/.bash_profile~


# 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

export PATH=’/usr/local/bin:??

the name of my computer is suppose to be shadow
[doublepost=1474655594][/doublepost]it worked just changing the name back to shadow i can now type the sudo cpmmands properly and this was the command that messed it up ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
 
this was the output for the first command
hahahahahahaa:~ Shadow$ cat ~/.bash_profile~


# 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

export PATH=’/usr/local/bin:??
The last line of that file is erroneous.


and this was the command that messed it up ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
Yes, I can see that in post #5.

What I asked for was where you got the instructions that told you to enter that command. In short, I'm asking "Where did you get that command?", not "What was the command?".

Please post the URL of the web page that told you to use that command.
If you don't remember or can't find it in your browser history, then please say that.

The reason I'm asking is because that command won't work. It contains an error.

If the error is in the original place that told you to use it, I'd like to know where that place is.
That way we can tell others who might read this thread not to use it.

On the other hand, something else may have caused the error.

If the original place where you got the command is correct, then I'll have to describe the possible things that could cause the error.
 
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:

ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

And here's some text with "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.
 
Last edited:
oh that makes a lot of sense now thanks and i will post a comment asking them to fix it
 
  • Like
Reactions: 997440
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.