Just the starting of some uses of the awk command. Log into the latest running docker container: docker exec -it $(docker ps | tail -1 | awk '{print $NF}') bash The command awk '{print $NF}' prints the last column only. Twitter