diff --git a/scripts/pkgdep.sh b/scripts/pkgdep.sh index 9a1bdef3d..5c87b040f 100755 --- a/scripts/pkgdep.sh +++ b/scripts/pkgdep.sh @@ -42,7 +42,7 @@ if [ -s /etc/redhat-release ]; then # Includes Fedora, CentOS 7, RHEL 7 # Add EPEL repository for CUnit-devel and libunwind-devel - if echo "$ID $VERSION_ID" | egrep -q 'rhel 7|centos 7'; then + if echo "$ID $VERSION_ID" | grep -E -q 'rhel 7|centos 7'; then if ! rpm --quiet -q epel-release; then yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm fi @@ -68,7 +68,7 @@ if [ -s /etc/redhat-release ]; then # Additional dependencies for building pmem based backends yum install -y libpmemblk-devel || true # Additional dependencies for SPDK CLI - not available in rhel and centos - if ! echo "$ID $VERSION_ID" | egrep -q 'rhel 7|centos 7'; then + if ! echo "$ID $VERSION_ID" | grep -E -q 'rhel 7|centos 7'; then yum install -y python3-configshell python3-pexpect fi # Additional dependencies for ISA-L used in compression diff --git a/scripts/setup.sh b/scripts/setup.sh index 3c168b311..59e6853a7 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -298,7 +298,7 @@ function cleanup_linux { done shopt -u extglob nullglob - files_to_clean+="$(ls -1 /dev/shm/* | egrep '(spdk_tgt|iscsi|vhost|nvmf|rocksdb|bdevio|bdevperf)_trace|spdk_iscsi_conns' || true) " + files_to_clean+="$(ls -1 /dev/shm/* | grep -E '(spdk_tgt|iscsi|vhost|nvmf|rocksdb|bdevio|bdevperf)_trace|spdk_iscsi_conns' || true) " files_to_clean="$(readlink -e assert_not_empty $files_to_clean || true)" if [[ -z "$files_to_clean" ]]; then echo "Clean" @@ -318,7 +318,7 @@ function cleanup_linux { echo 'Cleaning' for f in $files_to_clean; do - if ! echo "$opened_files" | egrep -q "^$f\$"; then + if ! echo "$opened_files" | grep -E -q "^$f\$"; then echo "Removing: $f" rm $f else @@ -327,7 +327,7 @@ function cleanup_linux { done for dir in $dirs_to_clean; do - if ! echo "$opened_files" | egrep -q "^$dir\$"; then + if ! echo "$opened_files" | grep -E -q "^$dir\$"; then echo "Removing: $dir" rmdir $dir else diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 3ea9d7689..5f6a876af 100644 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -116,7 +116,7 @@ if [ "$(uname -s)" = "Linux" ]; then export HUGEMEM=8192 elif [ "$(uname -s)" = "FreeBSD" ]; then MAKE=gmake - MAKEFLAGS=${MAKEFLAGS:--j$(sysctl -a | egrep -i 'hw.ncpu' | awk '{print $2}')} + MAKEFLAGS=${MAKEFLAGS:--j$(sysctl -a | grep -E -i 'hw.ncpu' | awk '{print $2}')} DPDK_FREEBSD_DIR=/usr/local/share/dpdk/x86_64-native-bsdapp-clang if [ -d $DPDK_FREEBSD_DIR ] && [ $SPDK_RUN_INSTALLED_DPDK -eq 1 ]; then WITH_DPDK_DIR=$DPDK_FREEBSD_DIR diff --git a/test/iscsi_tgt/sock/sock.sh b/test/iscsi_tgt/sock/sock.sh index e41b9e651..a13606a0c 100755 --- a/test/iscsi_tgt/sock/sock.sh +++ b/test/iscsi_tgt/sock/sock.sh @@ -42,12 +42,12 @@ function waitfortcp() { fi if $have_ss_cmd; then - if $ns_cmd ss -ln | egrep -q "\s+$addr\s+"; then + if $ns_cmd ss -ln | grep -E -q "\s+$addr\s+"; then break fi elif [[ "$(uname -s)" == "Linux" ]]; then # For Linux, if system doesn't have ss, just assume it has netstat - if $ns_cmd netstat -an | grep -iw LISTENING | egrep -q "\s+$addr\$"; then + if $ns_cmd netstat -an | grep -iw LISTENING | grep -E -q "\s+$addr\$"; then break fi fi diff --git a/test/json_config/json_config.sh b/test/json_config/json_config.sh index 16f2f98f6..a7722a91a 100755 --- a/test/json_config/json_config.sh +++ b/test/json_config/json_config.sh @@ -82,7 +82,7 @@ function tgt_check_notifications() { echo "ERROR: got extra event: $event_line" rc=false continue - elif ! echo "$ev_type" | egrep -q "^${ex_ev_type}\$" || ! echo "$ev_ctx" | egrep -q "^${ex_ev_ctx}\$"; then + elif ! echo "$ev_type" | grep -E -q "^${ex_ev_type}\$" || ! echo "$ev_ctx" | grep -E -q "^${ex_ev_ctx}\$"; then echo "ERROR: expected event '$1' but got '$event' (whole event line: $event_line)" rc=false fi