diff options
author | Mark Whitley <markw@lineo.com> | 2000-06-29 02:55:59 +0400 |
---|---|---|
committer | Mark Whitley <markw@lineo.com> | 2000-06-29 02:55:59 +0400 |
commit | 8bd891cbecb41442daab3496647e09575960056d (patch) | |
tree | 8b263d69ae55207d0fd0b7b67383da3696d0f4d7 /grep.c | |
parent | 1ca41775bbdc07cf67be79aebc566754c9c02855 (diff) |
Added support for reading from stdin with '-' as file name arg.
Diffstat (limited to 'grep.c')
-rw-r--r-- | grep.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -167,7 +167,7 @@ extern int grep_main(int argc, char **argv) /* If no files were specified, take input from stdin. Otherwise, we grep * through all the files specified. */ - if (argv[optind+1] == NULL) { + if (argv[optind+1] == NULL || (strcmp(argv[optind+1], "-") == 0)) { grep_file(stdin); } else { int i; |