Hi,
My app needs to run scripts in terminal using NSWorkspace but also needs to pass arguments depending on various other conditions. My code is as follows but I don't know how to pass the arguments:
Can anyone help?
Thanks,
My app needs to run scripts in terminal using NSWorkspace but also needs to pass arguments depending on various other conditions. My code is as follows but I don't know how to pass the arguments:
Code:
NSString * path = @"/path/to/script/script.sh";
NSURL * fileURL = [NSURL fileURLWithPath: path];
NSWorkspace * ws = [NSWorkspace sharedWorkspace];
[ws openFile:[fileURL path] withApplication:@"Terminal"];
Can anyone help?
Thanks,