artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39ef54b
)
Add warning when user specifies -R but no files, like GNU grep.
author
millert
<millert@openbsd.org>
Thu, 30 Apr 2015 13:49:04 +0000
(13:49 +0000)
committer
millert
<millert@openbsd.org>
Thu, 30 Apr 2015 13:49:04 +0000
(13:49 +0000)
OK schwarze@ ian@
usr.bin/grep/grep.c
patch
|
blob
|
history
diff --git
a/usr.bin/grep/grep.c
b/usr.bin/grep/grep.c
index
f9fd391
..
041d81e
100644
(file)
--- a/
usr.bin/grep/grep.c
+++ b/
usr.bin/grep/grep.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: grep.c,v 1.5
0 2015/03/16 13:27:59
millert Exp $ */
+/* $OpenBSD: grep.c,v 1.5
1 2015/04/30 13:49:04
millert Exp $ */
/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
@@
-444,6
+444,8
@@
main(int argc, char *argv[])
++argv;
}
+ if (Rflag && argc == 0)
+ warnx("warning: recursive search of stdin");
if (Eflag)
cflags |= REG_EXTENDED;
if (Fflag)