From 9eb76adec8d6a6f15a461da7c5e1e6920a92105a Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 7 Apr 2017 13:02:41 +0200 Subject: o Better logging. --- tri-influx-exec | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 tri-influx-exec (limited to 'tri-influx-exec') diff --git a/tri-influx-exec b/tri-influx-exec new file mode 100755 index 0000000..49dff82 --- /dev/null +++ b/tri-influx-exec @@ -0,0 +1,23 @@ +#!/bin/bash + +file=tri-influx-exec-$$ + +rm -f $file + +buf=() + +while read line +do + l=${line//#*} + echo l: $l > /dev/stderr + + buf+=($l) + + if [[ $l =~ ";" ]] + then + echo cmd: ${buf[*]} > /dev/stderr + echo ${buf[*]} + buf=() + fi + +done -- cgit v1.2.3