> Can we write a loop to run the simulation from 1 to 19 express cashiers > instead of having to read in from standard input for 19 times for each > different mean interarrival times? And another loop for the 3 different > interarrival times? I would rather you avoided changing the input format since the markers might decide to use a script to test all your solutions. You could either used a loop in your shell (lookup the 'foreach' command in any C shell documentation), or you could create a shell script to do this. Actually, I think I'll provide one for you. Cut the following text and paste it into a text file called 'run_loop' in your assignment directory. This is a Bourne shell script. You have to make the file an executable by issuing 'chmod +x run_loop' (without the quotes) in the assignment directory. After this you can run your solution with all 19 possible express cashier counts using something like 'run_loop 100 1200 1 1'. If you want you can display the output one page at a time using something like 'run_loop 100 1200 1 1 | more'. You can also redirect the output to a file using something like ''run_loop 100 1200 1 1 > output_file'. Depending on your environment setup, you might have to replace 'run_loop' with './run_loop'. Carl. ----------- cut here ------------ #!/bin/sh if [ $# != 4 ] then echo "Usage: run_loop " echo "example: run_loop 100 1200 1 1" exit 1 fi rep_interval=$1 end_time=$2 seed1=$3 seed2=$4 num_express=1 while [ "$num_express" -lt 20 ] do input="$rep_interval $end_time $seed1 $seed2 $num_express" echo "Output resulting from input = '$input':" echo echo "$input" | ./supermarket echo; echo; echo num_express=`expr $num_express + 1` done -------------- end ----------------