# set the length of the logfiles
set a=$1
set tmp=slen$$
shift
unset noclobber
foreach i ($argv)
# KLUDGE: tail doesn't work when a large line count is set
# We work around it here.  use ex instead of ed to avoid
# ed small limits
	ex - $i <<EOF
1,\$-${a}d
w /tmp/$tmp
q
EOF
	cp /tmp/$tmp $i
end
rm -f /tmp/$tmp
