aboutsummaryrefslogtreecommitdiff
path: root/findutils/grep.c
diff options
context:
space:
mode:
authormarkw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-06-28 22:55:59 +0000
committermarkw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-06-28 22:55:59 +0000
commit8d071d5c2813d7ff6ab405b7d77fdc9476246e88 (patch)
tree8b263d69ae55207d0fd0b7b67383da3696d0f4d7 /findutils/grep.c
parentaf98571c6c0491c8a3af7270c95fd2fb512f48c0 (diff)
downloadbusybox-w32-8d071d5c2813d7ff6ab405b7d77fdc9476246e88.tar.gz
busybox-w32-8d071d5c2813d7ff6ab405b7d77fdc9476246e88.tar.bz2
busybox-w32-8d071d5c2813d7ff6ab405b7d77fdc9476246e88.zip
Added support for reading from stdin with '-' as file name arg.
git-svn-id: svn://busybox.net/trunk/busybox@723 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'findutils/grep.c')
-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)
167 167
168 /* If no files were specified, take input from stdin. Otherwise, we grep 168 /* If no files were specified, take input from stdin. Otherwise, we grep
169 * through all the files specified. */ 169 * through all the files specified. */
170 if (argv[optind+1] == NULL) { 170 if (argv[optind+1] == NULL || (strcmp(argv[optind+1], "-") == 0)) {
171 grep_file(stdin); 171 grep_file(stdin);
172 } else { 172 } else {
173 int i; 173 int i;