diff options
Diffstat (limited to 'tri-influx-exec')
-rwxr-xr-x | tri-influx-exec | 23 |
1 files changed, 23 insertions, 0 deletions
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 |