From 84c1fcd006d98bd91e45e0e25415a85f460ed669 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Wed, 10 Aug 2022 14:16:31 -0600 Subject: [PATCH] whoops --- functions/cmd_to_container.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/cmd_to_container.sh b/functions/cmd_to_container.sh index 0dca8e79..e5ae6e7b 100644 --- a/functions/cmd_to_container.sh +++ b/functions/cmd_to_container.sh @@ -24,12 +24,12 @@ do done app_name=$(echo -e "$app_name" | grep ^"$selection)" | awk '{print $2}') search=$(k3s crictl ps -a -s running) -mapfile -t pod_id < <(echo "$search" | grep -E "[[:space:]]$app_name([[:space:]]|-([-[:alnum:]])*[[:space:]])" | awk '{print $9}') +mapfile -t pod_id < <(echo "$search" | grep -E "[[:space:]]$app_name([[:space:]]|-([-[:alnum:]])*[[:space:]])" | awk '{print $(NF)}') [[ "${#pod_id[@]}" == 0 ]] && echo -e "No containers available\nAre you sure the application in running?" && exit containers=$( for pod in "${pod_id[@]}" do - echo "$search" | grep "$pod" | awk '{print $(NF)}' + echo "$search" | grep "$pod" | awk '{print $7}' done | nl -s ") " | column -t) while true do