Opening Applications from the commandline

 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Opening Applications from the commandline
# 1  
Old 12-21-2011
Opening Applications from the commandline

as you probably/may know, one can open any application from the
application folder with the command
Code:
open -a program_name

I found that out today and so I created aliases in .bash_profile and
they work.
Code:
alias safari="open -a safari"
alias gimp="open -a gimp"
alias seamonkey="open -a seamonkey"
alias firefox="open -a firefox"
alias sketch="open -a sketchbookpro"
alias mindnode="open -a MindNode\ Pro"

spaces have to be escaped, so far so good.
since I have two vms in virtualbox I wanted to add parameters to these
open commands but looking for that I found that there is a simpler
way.
Code:
alias linux="VBoxManage startvm gNewSense"
alias xpro="VBoxManage startvm XP\ Professional"

now this is really nice - starts the vm without opening the virtualbox
screen.
I have several iphoto libraries and up to now I doubleclicked the
librarie file to open it, not anymore
I can just append the respective path to the open command
Code:
alias bpics="open -a iphoto /Volumes/HD500/BlenderImages"
alias images="open -a iphoto /Volumes/HD500/Image\ Database"
alias photos="open -a iphoto /Volumes/HD500/iPhoto\ Library"

in emacs I have to source .bash_profile first for the aliases to work
in a shell buffer ...
This may all be trivial but I would love to hear about how you do
things on your mac to navigate between the candy apps and the
underlying unix. So anyone - feel free to comment or point out better
ways, pitfalls, consequences etc. thank you.
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Checking commandline

mymk target How to check is on commandline or no? Cannot to find out ;( Know that I need to use if.....new in shell sorry Please use code tags next time for your code and data. (2 Replies)
Discussion started by: Manueldo
2 Replies

2. Shell Programming and Scripting

Multiple commandline switches

I have a script that has commandline switches that work no problem. But i don't know how to enable it to have multiple switches at one time. So I'd want myscript -h -o or even myscript -ho but i'm having no luck incorporating this. I tried shifting but i'm not getting it. Thanks ----------... (0 Replies)
Discussion started by: DC Slick
0 Replies

3. Shell Programming and Scripting

Using curl in commandline

Hi, I am using curl to hit a url using http in solaris 10 using commandline, I want to transfer an attachment(using multipart curl -F) also as a part of the request. If anyone has used kindly help me with the syntax. I am using below command: /usr/local/bin/curl -v... (1 Reply)
Discussion started by: manishmaha
1 Replies

4. Shell Programming and Scripting

$OPTARG changes commandline input

Hi there, I hope, that I do not open an thread, that is already existing, but I didn't found something matching with my problem while searching for problems with "getopts" My problem ist, that I'm taking arguments from commandline into my script with getopts, I've an flag -s, after that there... (2 Replies)
Discussion started by: thommes_pommes
2 Replies

5. Shell Programming and Scripting

Validating commandline argument

Hi, I am calling a script script2.shl from script1.shl as below script2.shl "TABLE_NAME" -r 10 In that I have to validate the parameter 4. i.e : it should be only 10 20 30 40 50 I know that I can do it by checking like below if ]; then echo "TRUE" else echo "FALSE" fi ... (3 Replies)
Discussion started by: mr_manii
3 Replies

6. UNIX for Dummies Questions & Answers

list only directories in commandline.

I want to list only directories in the command line using ls command. Can anyone please help me. (9 Replies)
Discussion started by: jhmr7
9 Replies
Login or Register to Ask a Question