change from var to array
This commit is contained in:
parent
9696082cc8
commit
d518de6e67
@ -32,9 +32,9 @@ 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}' | tr -d " \t\r ")"
|
||||||
done
|
done
|
||||||
readarray -t containers <<<"${containers[@]}"
|
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?"
|
||||||
|
Loading…
Reference in New Issue
Block a user