diff --git a/functions/cmd_to_container.sh b/functions/cmd_to_container.sh index 1f1c8d51..3a55241a 100644 --- a/functions/cmd_to_container.sh +++ b/functions/cmd_to_container.sh @@ -29,6 +29,7 @@ count=0 for pod in "${pod_id[@]}" do mapfile -t containers < <(echo "$search" | grep "$pod" | awk '{print $4}') + echo "${#containers[@]}" ((count++)) done @@ -43,13 +44,13 @@ else do clear -x title - + cont_search=$( for i in "${containers[@]}" do echo "$i" done | nl -s ") " | column -t - - + ) + echo "$cont_search" echo echo "0) Exit" read -rt 120 -p "Choose a container by number: " selection || { echo -e "\nFailed to make a selection in time" ; exit; }