In my terminal, I do
$ myprogram myfile.ext
.
I want to be able to do the same via the command /bin/bash
, but it is not working.
I tried
$ /bin/bash -c -l myprogram myfile.ext
but it is not working. It seems that my program
is launched but without my file.ext
as an option (as an input file)
Does anyone has a clue on how to do that?
Why I ask this question
I want to launch myprogram
via NSTask
in an a program I am writing for OSX
, with the cocoa
framework. If I simply ask NSTask
to launch my program, it seems that some variable environment
are missing. So, what I try is to launch a shell and inside this shell to launch myprogram
.