diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-11-12 01:28:46 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-11-12 01:28:46 +0100 |
commit | f1404aa9484e1a38b0924f74ac8b5796faf5c77a (patch) | |
tree | be571507f54f885aca4eddd0a8bc03f2ada4ee04 /Userland | |
parent | 18e3ddf6058d86f22df9fd90f6ad7f3a3833909f (diff) | |
download | serenity-f1404aa9484e1a38b0924f74ac8b5796faf5c77a.zip |
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! :^)
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/fgrep.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/fgrep.cpp b/Userland/fgrep.cpp index db4ffd36cf..2d9c7bc5ea 100644 --- a/Userland/fgrep.cpp +++ b/Userland/fgrep.cpp @@ -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; } |