| script called middle. Usage|
is given within the script itself. Show a few sample runs, and also explain
what is going on in the last line.
# check # of command line arguments
if [ $# -lt 3 ]
echo "Usage: middle <start line number> <end line number> <filename>"
# note that $1 is the first command line argument,
# $2 is the second argument, so on...
head -$2 $3 | tail -`expr $2 - $1 + 1`