array rebuild

This commit is contained in:
Heavybullets8 2022-08-21 22:04:42 -06:00
parent 0b786c3ef2
commit 354e132d8f

View File

@ -32,9 +32,9 @@ 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}' | tr -d " \t\r ")")
done
readarray -td, containers <<<"$containers"; declare -p containers;
containers=("${containers[@]}")
case "${#containers[@]}" in
0)
echo -e "No containers available\nAre you sure the application in running?"