1. xargs
docker ps -a | grep -v "CON" | awk ‘{print $1}‘ | xargs
2. sed
docker ps -a | grep -v "CON" | awk ‘{print $1}‘ | sed ‘:a; N;s/\n/ /; ta‘
3.tr
docker ps -a | grep -v "CON" | awk ‘{print $1}‘ | tr "\n" " "
2021-07-03 12:11:50
1. xargs
docker ps -a | grep -v "CON" | awk ‘{print $1}‘ | xargs
2. sed
docker ps -a | grep -v "CON" | awk ‘{print $1}‘ | sed ‘:a; N;s/\n/ /; ta‘
3.tr
docker ps -a | grep -v "CON" | awk ‘{print $1}‘ | tr "\n" " "