From b18818bbd503c932547f9876a439b918278d1b36 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Wed, 10 Aug 2022 17:25:13 -0600 Subject: [PATCH] attempt new for loop --- functions/cmd_to_container.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/cmd_to_container.sh b/functions/cmd_to_container.sh index 4f335a49..f1c35399 100644 --- a/functions/cmd_to_container.sh +++ b/functions/cmd_to_container.sh @@ -41,7 +41,8 @@ elif [[ "${#containers[@]}" == 0 ]]; then else for pod in "${pod_id[@]}" do - mapfile -t containers < <(echo "$search" | grep "$pod" | awk '{print $4}') + # mapfile -t containers < <(echo "$search" | grep "$pod" | awk '{print $4}') + IFS=" " read -r -a containers <<< "$(echo "$search" | grep "$pod" | awk '{print $4}')" done while true do