Regular Advisor
Re: Flush a file keeping last 10 lines
Hi

I have tried the Perl idea, with a small adjust for my case it works. However I have prefered this solution.

1.
tail -n 10 $i > /tmp/odb_Local_OracleCRSlogMngt.tmp.$DATE

2.
> $i

and finally
3.
cat /tmp/odb_Local_OracleCRSlogMngt.tmp.$DATE >> $i

rm -f /tmp/odb_Local_OracleCRSlogMngt.tmp.$DATE

What do you think about that guys ?

Bests Regards
Den