diff --git a/functions/cmd_to_container.sh b/functions/cmd_to_container.sh index f3b97e6c..d4a1d79e 100644 --- a/functions/cmd_to_container.sh +++ b/functions/cmd_to_container.sh @@ -32,7 +32,7 @@ do # continue # fi printf '%s\0' "${containers[@]}" | grep -Fxqz -- "$(echo "$search" | grep "$pod" | awk '{print $4}' | tr -d " \t\r ")" && continue - containers+=("$(echo "$search" | grep "$pod" | awk '{print $4}' | tr -d " \t\r ")") + containers+=("$(echo "$search" | grep "$pod" | awk '{print $4}' | sed 's/ /\n//')") done mapfile -t containers < <(echo "${containers[*]}") for i in "${containers[@]}"