wes@wes:~/Documents/python/ch1$ cat python-5
#!/usr/bin/env python
def pyfunc():
print("Hello Function!")
for i in range(5):
pyfunc()
wes@wes:~/Documents/python/ch1$ python python-5
Hello Function!
Hello Function!
Hello Function!
Hello Function!
Hello Function!
wes@wes:~/Documents/python/ch1$ cat shell-5
#!/bin/bash
function shfunc()
{
printf "Hello functionn"
}
for ((i=0; i<5; i++))
do
shfunc
done
wes@wes:~/Documents/python/ch1$ bash shell-5
Hello function
Hello function
Hello function
Hello function
Hello function
wes@wes:~/Documents/python/ch1$ cat python-6
#!/usr/bin/env python
# A System information gathering script
import subprocess
# Command1
def uname_func():
uname = "uname"
uname_arg = "-a"
print("Gathering system informaiton with %s command:n" %uname)