change to newline with sed

This commit is contained in:
Heavybullets8 2022-08-21 22:21:17 -06:00
parent ec37299970
commit cc43fb1983

View File

@ -32,7 +32,7 @@ do
# continue # continue
# fi # fi
printf '%s\0' "${containers[@]}" | grep -Fxqz -- "$(echo "$search" | grep "$pod" | awk '{print $4}' | tr -d " \t\r ")" && continue 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 done
mapfile -t containers < <(echo "${containers[*]}") mapfile -t containers < <(echo "${containers[*]}")
for i in "${containers[@]}" for i in "${containers[@]}"