#!/bin/dash # simple emulation of /usr/bin/seq for a COMP(2041|9044) example # andrewt@unsw.edu.au # Print the integers 1..n or n..m if test $# = 1 then first=1 last=$1 elif test $# = 2 then first=$1 last=$2 else echo "Usage: $0 or $0 " 1>&2 exit 1 fi number=$first while test $number -le "$last" do echo $number number=$((number + 1)) done