Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # A System Information Gathering Script
- import subprocess
- # Command 1
- def uname_func():
- uname = "uname"
- uname_arg = "-a"
- print "Gathering system information with %s command:\n" % uname
- subprocess.call([uname, uname_arg])
- # Command 2
- def disk_func():
- diskspace = "df"
- diskspace_arg = "-h"
- print "Gathering diskspace information %s command:\n" % diskspace
- subprocess.call([diskspace, diskspace_arg])
- # Main function that call other functions
- def main():
- uname_func()
- disk_func()
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement