mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-25 19:21:53 +00:00
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:
parent
e657f58cf9
commit
233d15452b
@ -24,7 +24,7 @@ _kata_get_subcmd_options()
|
||||
local subcmd="$1"
|
||||
|
||||
"$_kataruntime" "$subcmd" --help |\
|
||||
egrep -- "^ *--[^ ]*[ ][^ ]*" |\
|
||||
grep -E -- "^ *--[^ ]*[ ][^ ]*" |\
|
||||
awk '{print $1}' |\
|
||||
tr -d \, |\
|
||||
sort
|
||||
|
@ -277,8 +277,8 @@ find_system_journal_problems()
|
||||
|
||||
local problems=$(journalctl -q -o cat -a "$selector" "$program" |\
|
||||
grep "time=" |\
|
||||
egrep -i "$problem_pattern" |\
|
||||
egrep -iv "$problem_exclude_pattern" |\
|
||||
grep -i -E "$problem_pattern" |\
|
||||
grep -iv -E "$problem_exclude_pattern" |\
|
||||
tail -n ${PROBLEM_LIMIT})
|
||||
|
||||
if [ -n "$problems" ]; then
|
||||
@ -370,11 +370,11 @@ show_package_versions()
|
||||
pattern+=")"
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
separator
|
||||
@ -633,7 +633,7 @@ get_image_file()
|
||||
|
||||
local image=$(eval "$cmdline" 2>/dev/null |\
|
||||
grep -A 1 '^\[Image\]' |\
|
||||
egrep "\<Path\> =" |\
|
||||
grep -E "\<Path\> =" |\
|
||||
awk '{print $3}' |\
|
||||
tr -d '"')
|
||||
|
||||
@ -648,7 +648,7 @@ get_initrd_file()
|
||||
|
||||
local initrd=$(eval "$cmdline" 2>/dev/null |\
|
||||
grep -A 1 '^\[Initrd\]' |\
|
||||
egrep "\<Path\> =" |\
|
||||
grep -E "\<Path\> =" |\
|
||||
awk '{print $3}' |\
|
||||
tr -d '"')
|
||||
|
||||
@ -742,7 +742,7 @@ show_throttler_details()
|
||||
|
||||
throttlers=$(find /usr/libexec /usr/lib* -type f |\
|
||||
grep -v trigger |\
|
||||
egrep "(cc|kata)-ksm-throttler" |\
|
||||
grep -E "(cc|kata)-ksm-throttler" |\
|
||||
sort -u)
|
||||
|
||||
echo "$throttlers" | while read throttler
|
||||
|
Loading…
Reference in New Issue
Block a user