Launching apps from terminal (like linux?)

Joined
Dec 9, 2008
Messages
19
Reaction score
0
Points
1
One of the things I miss in OS X compared to linux (ubuntu) is the ability to easily launch applications from the terminal, with or with out parameters to open files in that application.

Eg if i wanted to edit a document on linux I would type
Code:
gedit ~/files/example.txt

In OS X I dont seem to be able to do this, is there a way?
I know I can add an alias entry for each program to just run it like below:
Code:
alias tx 'open /Applications/TextEdit.app/'
but what happens if i want to open a file with this application as I know the command is different (using the -a option).

Is there any way to get OS X to work like linux in this way?

thanks.
 
Joined
May 22, 2005
Messages
2,159
Reaction score
67
Points
48
Location
Closer than you think.
Your Mac's Specs
Performa 6116 2GBSCSI 8MB OS 7.5.3
open /Applications/TextEdit.app ~/File.txt

Assuming there is File.txt in the root of your home directory
 

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