Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jlegend

macrumors newbie
Original poster
Dec 3, 2008
3
0
I want to run a shell script I wrote, but I'm having some trouble figuring it out. this is my code so far.

Code:
NSString *crackPath = [[NSBundle mainBundle] pathForResource:@"shell" ofType:@"sh"];
    [NSString addFileWithPath:shellPath];
    
    [outPipe release];
    [inPipe release];
    [task release];
    
    outPipe = [[NSPipe alloc] init];
    inPipe = [[NSPipe alloc] init];
    task = [[NSTask alloc] init];
    
    [task setLaunchPath:shellPath];
    
    [task setStandardOutput:outPipe];
    [task setStandardInput:inPipe];
    
    
    [task launch];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.