runtime: replace egrep with grep -E to avoid deprecation warning

https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html

Signed-off-by: Balint Tobik <btobik@redhat.com>
This commit is contained in:
Balint Tobik 2025-01-28 10:12:13 +01:00
parent e657f58cf9
commit 233d15452b
2 changed files with 8 additions and 8 deletions

View File

@ -24,7 +24,7 @@ _kata_get_subcmd_options()
local subcmd="$1" local subcmd="$1"
"$_kataruntime" "$subcmd" --help |\ "$_kataruntime" "$subcmd" --help |\
egrep -- "^ *--[^ ]*[ ][^ ]*" |\ grep -E -- "^ *--[^ ]*[ ][^ ]*" |\
awk '{print $1}' |\ awk '{print $1}' |\
tr -d \, |\ tr -d \, |\
sort sort

View File

@ -277,8 +277,8 @@ find_system_journal_problems()
local problems=$(journalctl -q -o cat -a "$selector" "$program" |\ local problems=$(journalctl -q -o cat -a "$selector" "$program" |\
grep "time=" |\ grep "time=" |\
egrep -i "$problem_pattern" |\ grep -i -E "$problem_pattern" |\
egrep -iv "$problem_exclude_pattern" |\ grep -iv -E "$problem_exclude_pattern" |\
tail -n ${PROBLEM_LIMIT}) tail -n ${PROBLEM_LIMIT})
if [ -n "$problems" ]; then if [ -n "$problems" ]; then
@ -370,11 +370,11 @@ show_package_versions()
pattern+=")" pattern+=")"
if have_cmd "dpkg"; then if have_cmd "dpkg"; then
run_cmd_and_show_quoted_output "" "dpkg -l|egrep \"$pattern\"" run_cmd_and_show_quoted_output "" "dpkg -l|grep -E \"$pattern\""
fi fi
if have_cmd "rpm"; then if have_cmd "rpm"; then
run_cmd_and_show_quoted_output "" "rpm -qa|egrep \"$pattern\"" run_cmd_and_show_quoted_output "" "rpm -qa|grep -E \"$pattern\""
fi fi
separator separator
@ -633,7 +633,7 @@ get_image_file()
local image=$(eval "$cmdline" 2>/dev/null |\ local image=$(eval "$cmdline" 2>/dev/null |\
grep -A 1 '^\[Image\]' |\ grep -A 1 '^\[Image\]' |\
egrep "\<Path\> =" |\ grep -E "\<Path\> =" |\
awk '{print $3}' |\ awk '{print $3}' |\
tr -d '"') tr -d '"')
@ -648,7 +648,7 @@ get_initrd_file()
local initrd=$(eval "$cmdline" 2>/dev/null |\ local initrd=$(eval "$cmdline" 2>/dev/null |\
grep -A 1 '^\[Initrd\]' |\ grep -A 1 '^\[Initrd\]' |\
egrep "\<Path\> =" |\ grep -E "\<Path\> =" |\
awk '{print $3}' |\ awk '{print $3}' |\
tr -d '"') tr -d '"')
@ -742,7 +742,7 @@ show_throttler_details()
throttlers=$(find /usr/libexec /usr/lib* -type f |\ throttlers=$(find /usr/libexec /usr/lib* -type f |\
grep -v trigger |\ grep -v trigger |\
egrep "(cc|kata)-ksm-throttler" |\ grep -E "(cc|kata)-ksm-throttler" |\
sort -u) sort -u)
echo "$throttlers" | while read throttler echo "$throttlers" | while read throttler