From: Dobrica Pavlinusic Date: Tue, 2 Feb 2016 17:30:43 +0000 (+0100) Subject: read log from file specified as first argument X-Git-Url: http://git.rot13.org/?p=cheali-logview-gnuplot;a=commitdiff_plain;h=8375264f008b5880bba2a01fca06dce0265cd97a read log from file specified as first argument --- diff --git a/logview-scope.sh b/logview-scope.sh index 5d17792..f7e9d95 100755 --- a/logview-scope.sh +++ b/logview-scope.sh @@ -7,9 +7,14 @@ test -x driveGnuPlots.pl || wget http://users.softlab.ntua.gr/~ttsiod/driveGnuPlots.pl && chmod 755 driveGnuPlots.pl width=120 +file=$1 + +test -z "$file" && file=`ls -t log/*.log | head -1` + +echo "# using $width points from file $file" #tail -f `ls -t log/*.log | head -1` \ -cat `ls -t log/*.log | head -1` \ +cat $file \ | grep '$1' | cut -d\; -f \ 4,5,6,\ 10,11,\