Silly me askseds:
> how do you shorten (shuffle up) a huge logfile or mailbox A
> without losing the latest appends or the inode hardlinks?
Don't try this at home:
> flushlines=`grep -n '^From ' $mbox | tail -$count | head -1 | cut -d: -f1`
> into='open(A,"+<".shift);while(<>){print A};truncate(A,tell A)'
> test "$flushlines" -gt 0 && tail -$flushlines $mbox | perl -e "$into" $mbox
This meant to say
test "$flushlines" -gt 1 && tail +$flushlines $mbox | perl -e "$into" $mbox
to expire old mail messages from the beginning.
_______________________________________________
Bug-sh-utils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-sh-utils