mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-27 18:50:47 +00:00
17 lines
280 B
Mathematica
17 lines
280 B
Mathematica
|
#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);
|
||
|
}
|