Linux technical support - [email protected]


awk

# REMOVE FILES BY PATTEN
ls | grep "patern" | awk 'system("rm -f  "$0)'

# REMOVE DOCKER CONTAINER REMOTELY
ssh servername 'docker ps -a | grep "name-[0-9]" | awk '\''system("docker rm -f "'\$2')'\'''

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>