discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(no subject)


From: tgate
Subject: (no subject)
Date: Mon, 11 Dec 2006 15:09:41 -0800

ontent-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Hi,

You might also want to look at the cocoa dev tutorial:


This is interesting but I'm not really looking to wrap a unix command so the others seem more likely.

And these pages:

I was looking in to this area too - it's still on my todo list - if  
you get anywhere please let me know I'll be interested on how to do  
this myself.

This seems to work to pipe data into the program...


int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSFileHandle  *fh = [[NSFileHandle alloc] init];
fh = [NSFileHandle fileHandleWithStandardInput];
NSData *inData = [[NSData alloc] init];
inData = [fh readDataToEndOfFile];


NSString *myString = [[NSString alloc] initWithData: inData encoding: NSUTF8StringEncoding];
[inData release];

NSLog(@"\n%@\n", myString);
    [pool release];
    return 0;
}


but now how to I add the ability to use my program on the shebang line?  Is this not considered standard in?

___
#!/path/to/myProgram

and have the input data here?
___




reply via email to

[Prev in Thread] Current Thread [Next in Thread]