From aed2c12959b0d5bab2e2e43d0b2ad37940192a4f Mon Sep 17 00:00:00 2001 From: Jakub Wilk Date: Wed, 7 Sep 2022 17:55:16 +0200 Subject: [PATCH] Use "grep -E" instead of "egrep" The egrep command has been deprecated since GNU grep 2.5.3 (released in 2007). In GNU grep 3.8, it issues an obsolescence warning: https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d4 Use portable "grep -E" instead. --- tests/functions.sh | 2 +- tests/ts/look/separator | 4 ++-- tests/ts/mount/remount | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/functions.sh b/tests/functions.sh index e24d5c8798..216b66e64a 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -742,7 +742,7 @@ function ts_device_has { function ts_is_uuid() { - printf "%s\n" "$1" | egrep -q '^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$' + printf "%s\n" "$1" | grep -E -q '^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$' return $? } diff --git a/tests/ts/look/separator b/tests/ts/look/separator index c6028e3147..2a5ecf3074 100755 --- a/tests/ts/look/separator +++ b/tests/ts/look/separator @@ -22,8 +22,8 @@ # # for example: # -# cat words.raw | egrep --invert-match "'s$" | \ -# egrep "^[[:alnum:]'&!,./-]+$" | \ +# cat words.raw | grep -E --invert-match "'s$" | \ +# grep -E "^[[:alnum:]'&!,./-]+$" | \ # sort --ignore-case --dictionary-order | \ # uniq > words # diff --git a/tests/ts/mount/remount b/tests/ts/mount/remount index 468d5d30b2..827436cb88 100755 --- a/tests/ts/mount/remount +++ b/tests/ts/mount/remount @@ -42,7 +42,7 @@ mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE" $TS_CMD_MOUNT $DEVICE $TS_MOUNTPOINT || ts_die "Cannot mount $TS_MOUNTPOINT" # check the mount -egrep -q "^$DEVICE $TS_MOUNTPOINT" $MTAB_FILE \ +grep -E -q "^$DEVICE $TS_MOUNTPOINT" $MTAB_FILE \ || ts_die "Cannot find $TS_MOUNTPOINT in $MTAB_FILE" # remount -- 2.47.3