mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-27 10:40:50 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1440 72102866-910b-0410-8b05-ffd578937521
17 lines
320 B
Objective-C
17 lines
320 B
Objective-C
#include <gnustep/base/StdioStream.h>
|
|
#include <Foundation/NSString.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);
|
|
}
|