From 8375264f008b5880bba2a01fca06dce0265cd97a Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 2 Feb 2016 18:30:43 +0100 Subject: [PATCH] read log from file specified as first argument --- logview-scope.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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,\ -- 2.20.1