diff --git a/functions/cmd_to_container.sh b/functions/cmd_to_container.sh index 1effb5f0..9c198555 100644 --- a/functions/cmd_to_container.sh +++ b/functions/cmd_to_container.sh @@ -32,7 +32,7 @@ do echo "$search" | grep "$pod" | awk '{print $4}' done | nl -s ") " | column -t) if [[ "${#pod_id[@]}" == 1 ]]; then - container_id=$(echo "$search" | grep -E "[[:space:]]${pod_id[*]}[[:space:]]" | awk '{print $1}') + container_id=$(echo "$search" | grep -E "[[:space:]]${containers}[[:space:]]" | awk '{print $1}') else while true do