Simple test script

Suppose you have a Java program, say MySort, that we want to test for several input sizes. We can write a script to automate the testing as follows

#!/bin/sh
for n in 10000 20000 30000 40000 50000 60000
do
        echo "Running MySort for " $n " elements---"
        java MySort $n
        echo
done