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