diff options
| author | Michal Nasiadka <mnasiadka@gmail.com> | 2025-07-10 12:38:18 +0200 |
|---|---|---|
| committer | Pierre Riteau <pierre@stackhpc.com> | 2025-07-21 12:31:40 +0000 |
| commit | 180721846e02d16fb6d59df1c4f7599cfb16aec6 (patch) | |
| tree | 3022b32d17f292c58241d82f0365c8b2f9ade1ce /tools | |
| parent | 07726215dc3734c488cfcc40138740cb0b684d96 (diff) | |
| download | kolla-ansible-180721846e02d16fb6d59df1c4f7599cfb16aec6.tar.gz kolla-ansible-180721846e02d16fb6d59df1c4f7599cfb16aec6.zip | |
Remove egrep usage from scripts
egrep: warning: egrep is obsolescent; using grep -E
Change-Id: I4df0d520546da141cafc15e9464149059fdc06a6
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/cleanup-containers | 4 | ||||
| -rwxr-xr-x | tools/diag | 4 | ||||
| -rwxr-xr-x | tools/pre-commit-hook | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tools/cleanup-containers b/tools/cleanup-containers index d2759c598..627d3b878 100755 --- a/tools/cleanup-containers +++ b/tools/cleanup-containers @@ -24,12 +24,12 @@ fi if [ -n "$1" ]; then containers_to_kill=$(sudo $engine ps --filter "label=kolla_version" --format "{{.Names}}" -a | grep -E "$1" | awk '{print $1}') volumes_to_remove=$(sudo $engine inspect -f '{{range .Mounts}} {{printf "%s\n" .Name }}{{end}}' ${containers_to_kill} | \ - egrep -v '(^\s*$)' | sort | uniq) + grep -Ev '(^\s*$)' | sort | uniq) else containers_to_kill=$(sudo $engine ps --filter "label=kolla_version" --format "{{.Names}}" -a) volumes_to_remove=$(sudo $engine inspect -f '{{range .Mounts}} {{printf "%s\n" .Name }}{{end}}' ${containers_to_kill} | \ - egrep -v '(^\s*$)' | sort | uniq) + grep -Ev '(^\s*$)' | sort | uniq) fi if [[ "${containers_to_kill}" =~ "openvswitch_vswitchd" ]] && [[ "${containers_running}" =~ "neutron_openvswitch_agent" ]]; then diff --git a/tools/diag b/tools/diag index 157747343..75a49428a 100755 --- a/tools/diag +++ b/tools/diag @@ -3,7 +3,7 @@ container_engine="${1:-docker}" echo "##### System Identification #####" -egrep -w 'PRETTY_NAME|VERSION_ID' /etc/os-release +grep -Ew 'PRETTY_NAME|VERSION_ID' /etc/os-release echo "##### ${container_engine^} Version #####" $container_engine --version @@ -18,7 +18,7 @@ echo "##### List installed packages, including editables #####" pip list echo "##### Globals.yml file #####" -egrep -w 'kolla_base_distro|openstack_release' /etc/kolla/globals.yml +grep -Ew 'kolla_base_distro|openstack_release' /etc/kolla/globals.yml cat /etc/kolla/globals.yml | grep ^enable_ echo "##### ${container_engine^} Images #####" diff --git a/tools/pre-commit-hook b/tools/pre-commit-hook index 994716107..bf245158d 100755 --- a/tools/pre-commit-hook +++ b/tools/pre-commit-hook @@ -26,7 +26,7 @@ find . -type f echo "=== bashate checks ===" -files=$(egrep -rlI '^#!/(bin/|usr/bin/env )(ba)?sh' .) +files=$(grep -ErlI '^#!/(bin/|usr/bin/env )(ba)?sh' .) [ "$files" ] && (bashate $files || RES=1) echo "=== yaml checks ===" |
