#!/usr/bin/env python
# $ mycmd.py
# $ mv mycmd.py mycmd
# $ mkdir -p ~/bin
# Copy your script to ~/bin:
# $ cp mycmd ~/bin
# Finally, add ~/bin to your PATH:
# $ export PATH=$PATH":$HOME/bin"
# Add the this line to .profile or .bash_profile in your home directory: export PATH=$PATH":$HOME/bin".
# Reload changes: $ source .profile
import os
cmd = 'docker stop $(docker ps -aq)'
os.system(cmd)
print("All docker container was stoped!")
# $ mycmd.py
# $ mv mycmd.py mycmd
# $ mkdir -p ~/bin
# Copy your script to ~/bin:
# $ cp mycmd ~/bin
# Finally, add ~/bin to your PATH:
# $ export PATH=$PATH":$HOME/bin"
# Add the this line to .profile or .bash_profile in your home directory: export PATH=$PATH":$HOME/bin".
# Reload changes: $ source .profile
import os
cmd = 'docker stop $(docker ps -aq)'
os.system(cmd)
print("All docker container was stoped!")
Comments
Post a Comment