Running Unix commands from Objective-C

I'm writing a cocoa application that I need to use Unix commands for. In AppleScript, I commonly used


do shell script "Unix commands here"


In Cocoa, I have been using


NSAppleScript *script = [[NSAppleScript alloc] initWithsource:@"Unix commands here"];
NSDictionary *error = [[NSDictionary alloc] init];
[script executeAndReturnError:error];


It works fine, but is there a way to run Unix commands directly from Cocoa without going through NSAppleScript?

Mac OS X (10.5.5)

Posted on Oct 30, 2008 4:26 PM

Reply
7 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Running Unix commands from Objective-C

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.