From beeae110568fcb81f9aae8545be45090c4bcb312 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Thu, 18 Aug 2022 14:41:51 -0600 Subject: [PATCH] remove search variable --- functions/cmd_to_container.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/functions/cmd_to_container.sh b/functions/cmd_to_container.sh index 79361515..dfbc5215 100644 --- a/functions/cmd_to_container.sh +++ b/functions/cmd_to_container.sh @@ -23,8 +23,7 @@ do fi done app_name=$(echo -e "$app_name" | grep ^"$selection)" | awk '{print $2}') -search=$(k3s crictl pods -s ready --namespace ix) -mapfile -t pod_id < <(echo "$search" | grep -E "[[:space:]]$app_name([[:space:]]|-([-[:alnum:]])*[[:space:]])" | awk '{print $1}') +mapfile -t pod_id < <(k3s crictl pods -s ready --namespace ix | grep -E "[[:space:]]$app_name([[:space:]]|-([-[:alnum:]])*[[:space:]])" | awk '{print $1}') search=$(k3s crictl ps -a -s running | sed -E 's/[[:space:]]([0-9]*|About)[a-z0-9 ]{5,12}ago[[:space:]]//') for pod in "${pod_id[@]}" do