From adc614b54a20e83015268139b06391d2ab3d5960 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Mon, 17 Oct 2011 00:08:53 +0200 Subject: [PATCH] openmamba-makereport: first lines of log files are not very useful; instead only print last lines and grow tail size to 200 lines --- mambareport/openmamba-makereport | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/mambareport/openmamba-makereport b/mambareport/openmamba-makereport index 307d818..899c92a 100755 --- a/mambareport/openmamba-makereport +++ b/mambareport/openmamba-makereport @@ -68,25 +68,16 @@ function tailfile() { FILENAME=$1 FILEDESC=$2 - - for c in $1; do + + for c in $1; do cat >> $TEMPFILE << _EOF **************************************************************** -* File '$c' (first lines): $FILEDESC +* File '$c' (last 200 lines): $FILEDESC **************************************************************** _EOF - head -n 100 ${ROOT}/$c >> $TEMPFILE - - cat >> $TEMPFILE << _EOF - -**************************************************************** -* File '$c' (last lines): $FILEDESC -**************************************************************** -_EOF - - tail -n 100 ${ROOT}/$c >> $TEMPFILE + tail -n 200 ${ROOT}/$c >> $TEMPFILE done }