ftp.nice.ch/pub/next/developer/resources/libraries/libobjects.0.1.0.s.tar.gz#/libobjects-0.1.0/checks/pipes.m

This is pipes.m in view mode; [Download] [Up]

#include <objects/StdioStream.h>

int main()
{  
  char b[100];
  int len;
  id s = [[StdioStream alloc] initWithPipeFrom:"cat /etc/group | sort"];

  while ((len = [s readBytes:b length:99]) > 0)
    {
      b[len] = '\0';
      printf("[%d]: %s\n", len, b);
    }

  exit(0);
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.