Created
June 16, 2017 09:56
-
-
Save isurum/51f63e308f4e18998b09d10d27660305 to your computer and use it in GitHub Desktop.
A System Information Gathering Script Using Python
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
#!/usr/bin/env python | |
#A System Information Gathering Script | |
import subprocess | |
#Command 1 | |
uname = “uname” | |
uname_arg = “-a” | |
print "Gathering system information with %s command:\n" % uname | |
subprocess.call([uname, uname_arg]) | |
#Command 2 | |
diskspace = "df" | |
diskspace_arg = "-h" | |
print "Gathering diskspace information %s command:\n" % diskspace | |
subprocess.call([diskspace, diskspace_arg]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment