#!/usr/local/bin/tcsh -f #### # NetRand Project # Software Engineering - CS537 # Authors: # Spring - Francis William Kasper # # file: StartPinging # # This is a script file which reads a list of host names from a file and # executes PingRandomness for each host in the file. This process continues # in an infinite loop. Once the last host in the file is pinged, it starts # over from the beginning of the file. set javavm = java if ( $#argv != 1 ) then echo "StartPinging [host_file]" exit 1 endif if ( !(-e $1) ) then echo "(ERROR)StartPinging: " $4 " does not exist...exiting" exit 1 endif if ( !(-r $1) ) then echo "(ERROR)StartPinging: don't have read permission for " $4 "...exiting" exit 1 endif while ( 1 ) foreach host ( `cat hosts.txt` ) $javavm PingRandomness $host end end exit 0