diff --git a/coreutils/cat.c b/coreutils/cat.c index 2254a15..8ecda05 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c @@ -5,7 +5,7 @@ #include void cat(const int fd) { - char buf[4096]; + char buf[8096]; ssize_t len; while ((len = read(fd, buf, sizeof(buf))) > 0) @@ -14,7 +14,7 @@ void cat(const int fd) { } int main(const int argc, const char **argv) { - if (argc == 1) + if (argc == 1 || argv[1][0] == '-') cat(STDIN_FILENO); else {