• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Piping the result of a Unix command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Piping the result of a Unix command


  • Subject: Re: Piping the result of a Unix command
  • From: Lorenzo <email@hidden>
  • Date: Fri, 03 Oct 2003 20:42:06 +0200

Thank you.

It works beautyfully.

You are a genius.


Best Regards
--
Lorenzo
email: email@hidden

> From: "Alastair J.Houghton" <email@hidden>
> Date: Fri, 03 Oct 2003 14:39:31 +0100
> To: Lorenzo <email@hidden>
> Cc: Cocoa Forum <email@hidden>, Ben Dougall <email@hidden>
> Subject: Re: Piping the result of a Unix command
>
> NSFileHandle *theHandle = [thePipe fileHandleForReading];
>
> for (;;) {
> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
> NSData *dataOut = [theHandle availableData];
>
> if (![dataOut length]) {
> /* End of file, so exit */
> [pool release];
> break;
> }
>
> /* Process the data in "dataOut" */
>
> [pool release];
> }
>
> [task waitUntilExit];
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Piping the result of a Unix command (From: "Alastair J.Houghton" <email@hidden>)

  • Prev by Date: NSProgressIndicator
  • Next by Date: Re: How to locate bundle by bundleID?
  • Previous by thread: Re: Piping the result of a Unix command
  • Next by thread: How to locate bundle by bundleID?
  • Index(es):
    • Date
    • Thread