From 9af91e1e51d36c6d6e5d6b7f7276454a4eb601fc Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Sun, 21 Aug 2022 23:02:12 -0600 Subject: [PATCH] grep from file --- functions/cmd_to_container.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/cmd_to_container.sh b/functions/cmd_to_container.sh index 4c6bc98e..f2d3bc73 100644 --- a/functions/cmd_to_container.sh +++ b/functions/cmd_to_container.sh @@ -38,8 +38,8 @@ case "${#containers[@]}" in exit ;; 1) - container=$(echo "$search" | grep "${pod_id[0]}" | awk '{print $4}') - container_id=$(echo "$search" | grep -E "[[:space:]]${container}[[:space:]]" | awk '{print $1}') + container=$(grep "${pod_id[0]}" cont_file | awk '{print $4}') + container_id=$(grep -E "[[:space:]]${container}[[:space:]]" cont_file | awk '{print $1}') ;; *) while true