Created
March 2, 2015 14:14
-
-
Save xr09/db839751130b82aad1e1 to your computer and use it in GitHub Desktop.
subprocess
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| command = subprocess.Popen( ["-c", "who | cut -d' ' -f1 | sort | uniq | grep -v root" ], stdout=subprocess.PIPE, shell=True ) | |
| users, err = command.communicate() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment