aboutsummaryrefslogtreecommitdiff
path: root/findutils
diff options
context:
space:
mode:
Diffstat (limited to 'findutils')
-rw-r--r--findutils/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/findutils/grep.c b/findutils/grep.c
index a374e114d..ac55f19d1 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -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;