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