Terminal Open Application help

Joined
Oct 22, 2010
Messages
2,571
Reaction score
79
Points
48
Location
Bretforton, Worcestershire
Your Mac's Specs
MacBook Pro 15" 2014, 2.2GHz i7, 16GB RAM, 250GB SSD, OSX 10.9.5 - iPhone 5s 16gb
I'm quite new to the whole Terminal Application and learning the basics, just messing around trying to open applications using the "open -a" command, works great no problems, but here is the newbie question, when using "open -a chess" for instance it opens chess fine. But what do I do when I want to open Google Earth for example? If I type "open -a google earth" it obviously tries to find the application in /earth. What do I type to get the space in between "google" and "earth"?

Many Thanks

- Simon
 
Joined
Mar 30, 2004
Messages
4,744
Reaction score
381
Points
83
Location
USA
Your Mac's Specs
12" Apple PowerBook G4 (1.5GHz)
Couple ways:
1. Quote it
[font=Monaco,Menlo,Courier,"Courier New"]open -a "Google Earth"[/font]
2. Escape it
[font=Monaco,Menlo,Courier,"Courier New"]open -a Google\ Earth[/font]

That's the general rule for specifying a file name/path in any Unix command, by the way; it's not just open that behaves that way.
 
OP
Buzzard2010
Joined
Oct 22, 2010
Messages
2,571
Reaction score
79
Points
48
Location
Bretforton, Worcestershire
Your Mac's Specs
MacBook Pro 15" 2014, 2.2GHz i7, 16GB RAM, 250GB SSD, OSX 10.9.5 - iPhone 5s 16gb
Many thanks for the help :D

- Simon
 
Joined
Sep 13, 2006
Messages
3,570
Reaction score
470
Points
83
Location
Colorado
Your Mac's Specs
Mac's
it's the Space between Google and Earth that, in novice terms, messes up Terminal. quoting in the command gets past the space, and the \ essentially tells the system to ignore the space that is next.

keep at it. :)
 
OP
Buzzard2010
Joined
Oct 22, 2010
Messages
2,571
Reaction score
79
Points
48
Location
Bretforton, Worcestershire
Your Mac's Specs
MacBook Pro 15" 2014, 2.2GHz i7, 16GB RAM, 250GB SSD, OSX 10.9.5 - iPhone 5s 16gb
Many thanks, much help.

- Simon
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top