Skip to content

Commit 31dd145

Browse files
authored
Merge pull request #3239 from BsAtHome/fix_egrep-use
Replace obsolete 'egrep' with 'grep -E'
2 parents 1123be8 + 6551e51 commit 31dd145

File tree

6 files changed

+9
-10
lines changed

6 files changed

+9
-10
lines changed

docs/src/checkref

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ for F in $FILES; do
2323
OUT=.checklink.$LANGUAGE.$(basename $F).tmp
2424
rm -f $OUT
2525
linuxcnc-checklink --quiet --exclude "(http|https|irc)://" $F 2>&1 | tee $OUT
26-
egrep -q 'List of (broken links and other issues|duplicate and empty anchors)' $OUT
26+
grep -E -q 'List of (broken links and other issues|duplicate and empty anchors)' $OUT
2727
if [ $? -ne 1 ]; then
2828
BAD_LINKS=1
2929
fi

scripts/githelper.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
function githelper() {
1818
if [ -z "$1" ]; then
19-
GIT_BRANCH=$(git branch | egrep '^\*' | cut -d ' ' -f 2)
19+
GIT_BRANCH=$(git branch | grep -E '^\*' | cut -d ' ' -f 2)
2020
if [ "$GIT_BRANCH" = "(no" ]; then
2121
echo "'git branch' says we're not on a branch, pass one in as an argument" > /dev/null 1>&2
2222
return

scripts/swish

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Usage:
5959
by swish is grepped for this pattern, and matching lines are
6060
printed. By default, $b attempts to turn swish-pattern into
6161
a grep-pattern, but this only works if swish-pattern is a simple
62-
word. For more information about grep patterns, see 'man egrep'
62+
word. For more information about grep patterns, see 'man grep'
6363
EOF
6464
exit 1
6565
}
@@ -69,7 +69,7 @@ while getopts "hRF:" opt
6969
do
7070
case "$opt" in
7171
R) FORCEREBUILD=1 ;;
72-
F) FILEFILTER="egrep -z -e $OPTARG" ;;
72+
F) FILEFILTER="grep -E -z -e $OPTARG" ;;
7373
h|?) usage ;;
7474
esac
7575
done
@@ -91,9 +91,9 @@ fi
9191
if ! [ -z "$FILEFILTER" ]; then
9292
swish-e -f $SWISHINDEX -H0 -x '<swishdocpath>\0' -w "$PAT" \
9393
| $FILEFILTER | makerelative \
94-
| xargs -0 egrep -Hnis -e "$REGEXP"
94+
| xargs -0 grep -E -Hnis -e "$REGEXP"
9595
else
9696
swish-e -f $SWISHINDEX -H0 -x '<swishdocpath>\0' -w "$PAT" \
9797
| makerelative \
98-
| xargs -0 egrep -Hnis -e "$REGEXP"
98+
| xargs -0 grep -E -Hnis -e "$REGEXP"
9999
fi

src/configure.ac

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ fi
7373
AC_SUBST([EMC2VERSION])
7474

7575
AC_PATH_PROG(GREP, grep)
76-
AC_PATH_PROG(EGREP, egrep)
7776

7877
#
7978
# check for pkg-config

tests/module-loading/rtapi-app-main-fails/checkresult

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ if [ ! -f $STDERR ]; then
77
fi
88

99
# Linux spelling of ERANGE
10-
if egrep -q 'rtapi_app_main_fails.* Numerical result out of range' $STDERR; then
10+
if grep -E -q 'rtapi_app_main_fails.* Numerical result out of range' $STDERR; then
1111
echo "loadrt found the test component, and it failed to load"
1212
exit 0
1313
fi
1414

1515
# FreeBSD spelling of ERANGE
16-
if egrep -q 'rtapi_app_main_fails.* Result too large' $STDERR; then
16+
if grep -E -q 'rtapi_app_main_fails.* Result too large' $STDERR; then
1717
echo "loadrt found the test component, and it failed to load"
1818
exit 0
1919
fi

tests/module-loading/shared-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
halrun setup.hal > hal-output 2>&1
44
RESULT=$?
55

6-
NUM_PINS=$(cat hal-output | egrep $(cat PIN_NAME_REGEX) | wc -l)
6+
NUM_PINS=$(cat hal-output | grep -E $(cat PIN_NAME_REGEX) | wc -l)
77

88
if [ $RESULT -ne $(cat RESULT) ]; then
99
exit 1

0 commit comments

Comments
 (0)