#!/bin/python3 import sys import os print("There are ", len(sys.argv), " arguments") for arg in sys.argv: print (arg) print ("") print("Or the old fashion way") i = 0 while i < len(sys.argv): print(sys.argv[i]) i+= 1 print ("") print ("The environment variables") print ("") for item in os.environ: print(item, os.environ[item]) print ("") print ("Oh and my id is " , os.getpid()) print ("\tthe current directory is " , os.getenv("PWD")) print ("\tand my parent's id is " , os.getppid()) print ("\t and I am logged in as ", os.getlogin()) print ("\t and I am running on ", os.uname())