#! /bin/sh if test $# -ne 3 then echo "Usage: middle-sh " exit fi length=`wc -l < $3` bottom=`expr $length - $2 + 1` sed "1,$1 d; $bottom,$ d" $3