whoops
This commit is contained in:
parent
82a2deffa0
commit
84c1fcd006
@ -24,12 +24,12 @@ do
|
|||||||
done
|
done
|
||||||
app_name=$(echo -e "$app_name" | grep ^"$selection)" | awk '{print $2}')
|
app_name=$(echo -e "$app_name" | grep ^"$selection)" | awk '{print $2}')
|
||||||
search=$(k3s crictl ps -a -s running)
|
search=$(k3s crictl ps -a -s running)
|
||||||
mapfile -t pod_id < <(echo "$search" | grep -E "[[:space:]]$app_name([[:space:]]|-([-[:alnum:]])*[[:space:]])" | awk '{print $9}')
|
mapfile -t pod_id < <(echo "$search" | grep -E "[[:space:]]$app_name([[:space:]]|-([-[:alnum:]])*[[:space:]])" | awk '{print $(NF)}')
|
||||||
[[ "${#pod_id[@]}" == 0 ]] && echo -e "No containers available\nAre you sure the application in running?" && exit
|
[[ "${#pod_id[@]}" == 0 ]] && echo -e "No containers available\nAre you sure the application in running?" && exit
|
||||||
containers=$(
|
containers=$(
|
||||||
for pod in "${pod_id[@]}"
|
for pod in "${pod_id[@]}"
|
||||||
do
|
do
|
||||||
echo "$search" | grep "$pod" | awk '{print $(NF)}'
|
echo "$search" | grep "$pod" | awk '{print $7}'
|
||||||
done | nl -s ") " | column -t)
|
done | nl -s ") " | column -t)
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
Loading…
Reference in New Issue
Block a user