if only one container, auto select it
This commit is contained in:
parent
074b3d09cf
commit
6f7f18d6a4
@ -31,8 +31,11 @@ for pod in "${pod_id[@]}"
|
||||
do
|
||||
echo "$search" | grep "$pod" | awk '{print $4}'
|
||||
done | nl -s ") " | column -t)
|
||||
while true
|
||||
do
|
||||
if [[ "${#pod_id[@]}" == 1 ]]; then
|
||||
container_id=$(echo "$search" | grep -E "[[:space:]]${container}[[:space:]]" | awk '{print $1}')
|
||||
else
|
||||
while true
|
||||
do
|
||||
clear -x
|
||||
title
|
||||
echo "$containers"
|
||||
@ -49,9 +52,10 @@ do
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
container=$(echo "$containers" | grep ^"$selection)" | awk '{print $2}')
|
||||
container_id=$(echo "$search" | grep -E "[[:space:]]${container}[[:space:]]" | awk '{print $1}')
|
||||
done
|
||||
container=$(echo "$containers" | grep ^"$selection)" | awk '{print $2}')
|
||||
container_id=$(echo "$search" | grep -E "[[:space:]]${container}[[:space:]]" | awk '{print $1}')
|
||||
fi
|
||||
while true
|
||||
do
|
||||
clear -x
|
||||
|
Loading…
Reference in New Issue
Block a user