#! /bin/bash if [ -z "$1" ] then docker ps --format "{{.Names}} {{.Image}} {{.Status}}" exit 0 fi docker exec -it "$1" /bin/bash 2> /dev/null