diff --git a/functions/cmd_to_container.sh b/functions/cmd_to_container.sh index e40a1175..72f79990 100644 --- a/functions/cmd_to_container.sh +++ b/functions/cmd_to_container.sh @@ -67,7 +67,7 @@ case "${#containers[@]}" in fi done container=$(echo "$cont_search" | grep ^"$selection)" | awk '{print $2}') - container_id=$(echo "$search" | grep -E "[[:space:]]${container}[[:space:]]" | awk '{print $1}') + container_id=$(grep -E "[[:space:]]${container}[[:space:]]" cont_file | awk '{print $1}') ;; esac while true