diff options
author | Eric Andersen | 2000-09-21 02:39:50 +0000 |
---|---|---|
committer | Eric Andersen | 2000-09-21 02:39:50 +0000 |
commit | d1de4a16ad662bdd8e26da5662a5b0678ce4995e (patch) | |
tree | 83d6bc1482cd26248cb88f06949f74bc8328b3b6 /cat.c | |
parent | f34aa4c3781d42b400ddc451555aff11110f5ac3 (diff) | |
download | busybox-d1de4a16ad662bdd8e26da5662a5b0678ce4995e.zip busybox-d1de4a16ad662bdd8e26da5662a5b0678ce4995e.tar.gz |
Handle 'cat -'
Diffstat (limited to 'cat.c')
-rw-r--r-- | cat.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -31,11 +31,10 @@ extern int cat_main(int argc, char **argv) exit(TRUE); } - if (**(argv + 1) == '-') - usage(cat_usage); - while (--argc > 0) { - if (print_file_by_name(*++argv) == FALSE) { + if(!(strcmp(*++argv, "-"))) { + print_file(stdin); + } else if (print_file_by_name(*argv) == FALSE) { perror(*argv); exit(FALSE); } |