grep: add support for -r

This commit is contained in:
Denis Vlasenko
2006-10-14 14:24:30 +00:00
parent c345d8e945
commit 3a6755f56f
5 changed files with 145 additions and 109 deletions

View File

@@ -252,8 +252,8 @@ extern FILE *bb_wfopen(const char *path, const char *mode);
extern FILE *bb_wfopen_input(const char *filename);
extern FILE *xfopen(const char *path, const char *mode);
extern int bb_fclose_nonstdin(FILE *f);
extern void bb_fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN;
extern int bb_fclose_nonstdin(FILE *f);
extern void bb_fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN;
extern void xstat(char *filename, struct stat *buf);
extern int xsocket(int domain, int type, int protocol);

View File

@@ -992,7 +992,7 @@ USE_FEATURE_DATE_ISOFMT( \
"\t-H login_host\tLog login_host into the utmp file as the hostname"
#define grep_trivial_usage \
"[-ihHnqvso" \
"[-rihHnqvso" \
USE_FEATURE_GREP_EGREP_ALIAS("E") \
USE_FEATURE_GREP_CONTEXT("ABC") \
"] PATTERN [FILEs...]"
@@ -1001,6 +1001,7 @@ USE_FEATURE_DATE_ISOFMT( \
"Options:\n" \
"\t-H\tprefix output lines with filename where match was found\n" \
"\t-h\tsuppress the prefixing filename on output\n" \
"\t-r\trecurse subdirectories\n" \
"\t-i\tignore case distinctions\n" \
"\t-l\tlist names of files that match\n" \
"\t-L\tlist names of files that do not match\n" \