From c839f2aa645f9bd3cdd4f852c00b96606896cee3 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 2 Feb 2016 22:28:15 +0100 Subject: [PATCH] use new driveGnuPlots.pl with columns and auto-geometry --- cheali-scope.sh | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 cheali-scope.sh diff --git a/cheali-scope.sh b/cheali-scope.sh new file mode 100755 index 0000000..21eaab6 --- /dev/null +++ b/cheali-scope.sh @@ -0,0 +1,61 @@ +#!/bin/sh -xe + +# .i3/config +# for_window[title="^Gnuplot"] floating enable + +# http://users.softlab.ntua.gr/~ttsiod/gnuplotStreaming.html +test -x driveGnuPlots.pl || wget http://users.softlab.ntua.gr/~ttsiod/driveGnuPlots.pl && chmod 755 driveGnuPlots.pl + +width=600 +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 $file \ +| grep '$1' | cut -d\; -f \ +4,5,6,\ +10,11,\ +12,13,14,15,16,17,\ +18,19,20,21,22,23,\ +24,25,26,27,28 \ +| sed \ +-e 's/^/0:/' \ +-e 's/;/\n1:/' \ +-e 's/;/\n2:/' \ +-e 's/;/\n3:/' \ +-e 's/;/\n4:/' \ +-e 's/;/\n5:/' \ +-e 's/;/\n6:/' \ +-e 's/;/\n7:/' \ +-e 's/;/\n8:/' \ +-e 's/;/\n9:/' \ +-e 's/;/\n10:/' \ +-e 's/;/\n11:/' \ +-e 's/;/\n12:/' \ +-e 's/;/\n13:/' \ +-e 's/;/\n14:/' \ +-e 's/;/\n15:/' \ +-e 's/;/\n16:/' \ +-e 's/;/\n17:/' \ +-e 's/;/\n18:/' \ +-e 's/;/\n19:/' \ +-e 's/;/\n20:/' \ +-e 's/;/\n21:/' \ +-e 's/;/\n22:/' \ +| ./driveGnuPlots.pl 22 \ +$width $width $width \ +$width $width \ +$width $width $width $width $width $width \ +$width $width $width $width $width $width \ +$width $width $width $width $width \ +V mA mAh \ +temp Vinput, \ +v1 v2 v3 v4 v5 v6, \ +r1 r2 r3 r4 r5 r6, \ +Rbat Rwire Z AA AB \ +2>/dev/null + +# leave empty line bove this one -- 2.20.1