diff options
author | 2015-04-30 13:49:04 +0000 | |
---|---|---|
committer | 2015-04-30 13:49:04 +0000 | |
commit | 016f3eef983cfe509272ce4b1a85864434ed308d (patch) | |
tree | 32c19fa76be74554277bd76a5e3257ab47c3907f /usr.bin/grep/grep.c | |
parent | Remove SIZE_MAX from limits.h. It was added years ago before we (diff) | |
download | wireguard-openbsd-016f3eef983cfe509272ce4b1a85864434ed308d.tar.xz wireguard-openbsd-016f3eef983cfe509272ce4b1a85864434ed308d.zip |
Add warning when user specifies -R but no files, like GNU grep.
OK schwarze@ ian@
Diffstat (limited to 'usr.bin/grep/grep.c')
-rw-r--r-- | usr.bin/grep/grep.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c index f9fd3911ede..041d81ec9f8 100644 --- a/usr.bin/grep/grep.c +++ b/usr.bin/grep/grep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grep.c,v 1.50 2015/03/16 13:27:59 millert Exp $ */ +/* $OpenBSD: grep.c,v 1.51 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) |