Sadly, DOS does not have nested $() function support like Linux/Unix

Let’s say you need to clean up several docker containers

On Linux: 
-- Simply use the nested $() function
docker rm $(docker ps -a -q|grep docker-ls)

On Windows:
-- You will need to rethink and use a forloop
for /f %a in ('docker ps -a ^|grep docker-ls ^|gawk "{print $1}"') do docker rm %a

Leave a Reply