From 94a0819fe3a0d679c3042a77bfe6a2afc505daea Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:28 +0200 Subject: Adding upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- src/etc/cat-and-grep.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/etc/cat-and-grep.sh') diff --git a/src/etc/cat-and-grep.sh b/src/etc/cat-and-grep.sh index 77dc52a93..238f7f5b6 100755 --- a/src/etc/cat-and-grep.sh +++ b/src/etc/cat-and-grep.sh @@ -26,7 +26,7 @@ Options: -i Case insensitive search. ' -GREPPER=fgrep +GREPPER=grep INVERT=0 GREPFLAGS='q' while getopts ':vieh' OPTION; do @@ -39,7 +39,7 @@ while getopts ':vieh' OPTION; do GREPFLAGS="i$GREPFLAGS" ;; e) - GREPPER=egrep + GREPFLAGS="E$GREPFLAGS" ;; h) echo "$USAGE" @@ -51,6 +51,12 @@ while getopts ':vieh' OPTION; do esac done +if ! echo "$GREPFLAGS" | grep -q E +then + # use F flag if there is not an E flag + GREPFLAGS="F$GREPFLAGS" +fi + shift $((OPTIND - 1)) # use gnu version of tool if available (for bsd) -- cgit v1.2.3