aboutsummaryrefslogtreecommitdiffstats
path: root/extra-tools
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2017-01-01 00:35:00 +0000
committerbloodstalker <thabogre@gmail.com>2017-01-01 00:35:00 +0000
commitb18b1934b320df549dfa6e7fc173c1ea6d86792a (patch)
treee8cb287e361bdd49f226eca533281be4d0008bea /extra-tools
parentupdated (diff)
downloadmutator-b18b1934b320df549dfa6e7fc173c1ea6d86792a.tar.gz
mutator-b18b1934b320df549dfa6e7fc173c1ea6d86792a.zip
colorful human redable print for the simple-text output of mutator-lvl0
Diffstat (limited to 'extra-tools')
-rwxr-xr-xextra-tools/ReportPrintPretty.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/extra-tools/ReportPrintPretty.sh b/extra-tools/ReportPrintPretty.sh
new file mode 100755
index 0000000..4ec08ab
--- /dev/null
+++ b/extra-tools/ReportPrintPretty.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+#the first input should be the raw report output
+#the second output should be the file name for the pretty output
+"cat" "$1" | gawk '
+BEGIN{RS = "\n";FS = ":"}
+function red(s) {printf "\033[1;31m" s "\033[0m "}
+function green(s) {printf "\033[1;32m" s "\033[0m "}
+function blue(s) {printf "\033[1;34m" s "\033[0m "}
+ {print red($1)green($2)green($3)blue($4)blue($5)}
+END{}
+' > "$2" \ No newline at end of file