Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to write a shell script on a Mac which opens RIATest and passes it parameters. My code is:

echo THIS TEST!!!

open -a '/Applications/RIATest 4/' --args /b  /r  /e 5  /p ..//FMNG_RIATest//doScriptGenerator.rtp  /rs ..//FMNG_RIATest//doScriptGenerator.rts  /rf ..//FMNG_RIATest/doScriptGenerator.rtw

As soon as I put an argument following --args the program does not open. Any help would be appreciated.

share|improve this question
Check your formatting please. You indent code with Ctrl-K. – slhck Jun 12 '12 at 14:46

1 Answer 1

up vote 0 down vote accepted

Make sure you're using dashes (-) for your arguments on OSX instead of forward slashes (/) .

It's not clearly mentioned in their documentation, but if you look at the top where they're explaining how to export RIATest to your path, you can see an example of the command-line switches being used. All of the other examples describe RIATest.exe, which is a windows executable, and explains why they have forward slashes. Just silently translate them into dashes when building your command line on OSX.

share|improve this answer
The --args thing should actually work, per open's manpage. – slhck Jun 12 '12 at 14:48
I found the executable_name and tried this code open -a /Applications/'RIATest 4'/ /b but I got an error which said that the file /b does not exist. When I added the --args before /b in that line it gave no error but the program still did not open. Thanks a lot for the quick responses! – Kevin Doherty Jun 12 '12 at 14:58
@KevinDoherty Use - instead of / on the flags - / is for windows, - is for unix-like environments (MacOSX). – Darth Android Jun 12 '12 at 15:10
@KevinDoherty Updated my answer - see if your original attempt works with the dashes. – Darth Android Jun 12 '12 at 15:20
Good call with the dashes. But my original attempt still does not open the program. The only evidence I have that the script ran is the echo. For reference: #!/bin/bash echo THIS TEST!!! open -a '/Applications/RIATest 4/' --args -b -r -e 5 -p ..//FMNG_RIATest//doScriptGenerator.rtp -rs ..//FMNG_RIATest//doScriptGenerator.rts -rf ..//FMNG_RIATest/doScriptGenerator.rtw Once again, thanks a lot for your time – Kevin Doherty Jun 12 '12 at 15:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.