Use extended regular expressions when invoked as egrep (noted and initial
patch by Charles Steinkuehler).
This commit is contained in:
parent
b5f2516e3f
commit
999623e973
@ -8,6 +8,9 @@ comment 'Finding Utilities'
|
|||||||
|
|
||||||
bool 'find' CONFIG_FIND
|
bool 'find' CONFIG_FIND
|
||||||
bool 'grep' CONFIG_GREP
|
bool 'grep' CONFIG_GREP
|
||||||
|
if [ "$CONFIG_GREP" = "y" ] ; then
|
||||||
|
bool ' egrep alias' CONFIG_FEATURE_GREP_EGREP_ALIAS
|
||||||
|
fi
|
||||||
bool 'which' CONFIG_WHICH
|
bool 'which' CONFIG_WHICH
|
||||||
bool 'xargs' CONFIG_XARGS
|
bool 'xargs' CONFIG_XARGS
|
||||||
endmenu
|
endmenu
|
||||||
|
@ -243,6 +243,11 @@ extern int grep_main(int argc, char **argv)
|
|||||||
perror_msg_and_die("atexit");
|
perror_msg_and_die("atexit");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_FEATURE_GREP_EGREP_ALIAS
|
||||||
|
if (strcmp (basename (argv[0]), "egrep") == 0)
|
||||||
|
reflags |= REG_ICASE;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* do normal option parsing */
|
/* do normal option parsing */
|
||||||
while ((opt = getopt(argc, argv, "iHhlnqvsce:f:"
|
while ((opt = getopt(argc, argv, "iHhlnqvsce:f:"
|
||||||
#ifdef CONFIG_FEATURE_GREP_CONTEXT
|
#ifdef CONFIG_FEATURE_GREP_CONTEXT
|
||||||
|
@ -149,7 +149,7 @@
|
|||||||
#ifdef CONFIG_ECHO
|
#ifdef CONFIG_ECHO
|
||||||
APPLET(echo, echo_main, _BB_DIR_BIN)
|
APPLET(echo, echo_main, _BB_DIR_BIN)
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_FEATURE_GREP_EGREP_ALIAS) && defined(CONFIG_GREP)
|
#if defined(CONFIG_FEATURE_GREP_EGREP_ALIAS)
|
||||||
APPLET_NOUSAGE("egrep", grep_main, _BB_DIR_BIN)
|
APPLET_NOUSAGE("egrep", grep_main, _BB_DIR_BIN)
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_ENV
|
#ifdef CONFIG_ENV
|
||||||
|
Loading…
Reference in New Issue
Block a user