From: Murphy Zhou Date: Tue, 20 Sep 2022 03:19:50 +0000 (+0800) Subject: egrep, fgrep: deprecated X-Git-Tag: v2022.09.25~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1cbaf24e0cc87828504b139f38bfe9c31b05841c;p=xfstests-dev.git egrep, fgrep: deprecated Since this grep commit: commit a9515624709865d480e3142fd959bccd1c9372d1 Author: Paul Eggert Date: Sun Aug 15 10:52:13 2021 -0700 egrep, fgrep: now obsolete egrep will trigger a warning like: +egrep: warning: egrep is obsolescent; using grep -E This will break many gold output. Signed-off-by: Murphy Zhou Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- diff --git a/check b/check index 000e31cb..af23572c 100755 --- a/check +++ b/check @@ -389,7 +389,7 @@ if $have_test_arg; then test_name=`basename $t` group_file=$SRC_DIR/$test_dir/group.list - if egrep -q "^$test_name" $group_file; then + if grep -Eq "^$test_name" $group_file; then # in group file ... OK echo $SRC_DIR/$test_dir/$test_name \ >>$tmp.arglist diff --git a/common/btrfs b/common/btrfs index bd2639bf..d27d3384 100644 --- a/common/btrfs +++ b/common/btrfs @@ -9,7 +9,7 @@ _btrfs_get_subvolid() mnt=$1 name=$2 - $BTRFS_UTIL_PROG sub list $mnt | egrep "\s$name$" | $AWK_PROG '{ print $2 }' + $BTRFS_UTIL_PROG sub list $mnt | grep -E "\s$name$" | $AWK_PROG '{ print $2 }' } # _require_btrfs_command [|