test array rebuild

This commit is contained in:
Heavybullets8 2022-08-21 21:36:27 -06:00
parent 7af36bb1a4
commit 9696082cc8

View File

@ -33,8 +33,8 @@ do
# 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}' | tr -d " \t\r ")")
done done
readarray -t containers <<<"${containers[@]}"
case "${#containers[@]}" in case "${#containers[@]}" in
0) 0)
echo -e "No containers available\nAre you sure the application in running?" echo -e "No containers available\nAre you sure the application in running?"