servers=`grep nameserver /etc/resolv.conf | cut -f 2` for server in $servers do foctet=`echo $server | cut -f 1 -d .` if `test $foctet -lt 127` then class="A" network="$foctet.0.0.0" fi if `test $foctet -gt 127` then class="B" network="`echo $server | cut -f 1,2 -d .`.0.0" fi if `test $foctet -gt 191` then class="C" network="`echo $server | cut -f 1,2,3 -d .`.0" fi echo "The $server is a member of the class $class network $network " done groups=`cut -f 1,3 -d : /etc/group` for element in $groups do gname=`echo $element | cut -f 1 -d :` gid=`echo $element | cut -f 2 -d :` echo "The group $gname has the group identification number of $gid" done Purpose: Output the user Name and ID. users=`cut -f 1,3 -d : /etc/passwd` for element in $users do uname=`echo $element | cut -f 1 -d :` uid=`echo $element | cut -f 2 -d :` echo "$uname has the user identification number of $uid" done