commit 50dbbd3f0f81bd05f4a75ff721f603a31c0526e7 parent 06fcb83add88e663e035c53eb7322d049d73460e Author: Daniel Gultsch <daniel@gultsch.de> Date: Mon, 20 Jun 2016 15:26:30 +0200 made tojson converter more resilient to missing breaks Diffstat:
M | reports/tojson.sh | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/reports/tojson.sh b/reports/tojson.sh @@ -6,7 +6,7 @@ echo -n '{' for report in "${reports[@]}"; do server=$(echo $report | sed 's/.txt//') echo -n "\"$server\":" - echo -n '{' ; tail -n 17 $report | head -n 12 | sed 's/running //' | sed 's/…//' | awk -F '\t\t' '{ printf "\"" $1 "\":\"" $2 "\""; if (NR != 12) printf "," }'; echo -n '}' + echo -n '{' ; grep -B 14 'Conversations Compliance Suite: ' $report | head -n 12 | sed 's/running //' | sed 's/…//' | awk -F '\t\t' '{ printf "\"" $1 "\":\"" $2 "\""; if (NR != 12) printf "," }'; echo -n '}' if [[ $report != $last ]]; then echo -n ','; fi; done; echo '}'