commit 9349d533f657df515225030b2b512f89f71875cf parent 1c8e3343b817c6d805164773fbd9bbe52cd582b8 Author: Daniel Gultsch <daniel@gultsch.de> Date: Wed, 5 Oct 2016 10:24:23 +0200 fixed tojson script to deal with spaces instead of tabs 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 '{' ; 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 '}' + echo -n '{' ; grep -B 14 'Conversations Compliance Suite: ' $report | head -n 12 | sed 's/running //' | sed 's/…//' | sed -e 's/ \{3,\}/\t\t/g' | awk -F '\t\t' '{ printf "\"" $1 "\":\"" $2 "\""; if (NR != 12) printf "," }'; echo -n '}' if [[ $report != $last ]]; then echo -n ','; fi; done; echo '}'