On Jan 2, 2004, at 8:04 PM, Kuestner, Bjoern wrote: > does anybody have a simple solution to remove the last ten lines of > files > (of variable length). #! /bin/sh i=`grep -c $ $*` j=`expr $i - 10` if [ $j -lt 1 ]; then j=$i fi head -n $j $* if ... fi would not be necessary, perhaps. Kino