This commit is contained in:
Your Name 2023-11-04 17:55:02 +03:00
parent e61dc1ffaa
commit 93ec00d3d6

View File

@ -5,7 +5,7 @@
#include <unistd.h>
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 {