mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
Add primitive FIFO and hook it up to sys$pipe().
It's now possible to do this in bash: cat kernel.map | fgrep List This is very cool! :^)
This commit is contained in:
parent
18e3ddf605
commit
f1404aa948
13 changed files with 305 additions and 22 deletions
|
@ -11,10 +11,10 @@ int main(int argc, char** argv)
|
|||
for (;;) {
|
||||
char buf[4096];
|
||||
fgets(buf, sizeof(buf), stdin);
|
||||
if (feof(stdin))
|
||||
return 0;
|
||||
if (strstr(buf, argv[1]))
|
||||
write(1, buf, strlen(buf));
|
||||
if (feof(stdin))
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue