From 82a2deffa071668d2c53fa88cc79286a46f79a8b Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Wed, 10 Aug 2022 14:14:24 -0600 Subject: [PATCH] print only last column for pod --- functions/cmd_to_container.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/cmd_to_container.sh b/functions/cmd_to_container.sh index 173aaca7..0dca8e79 100644 --- a/functions/cmd_to_container.sh +++ b/functions/cmd_to_container.sh @@ -29,7 +29,7 @@ mapfile -t pod_id < <(echo "$search" | grep -E "[[:space:]]$app_name([[:space:]] containers=$( for pod in "${pod_id[@]}" do - echo "$search" | grep "$pod" | awk '{print $7}' + echo "$search" | grep "$pod" | awk '{print $(NF)}' done | nl -s ") " | column -t) while true do