summaryrefslogtreecommitdiffstats
path: root/src/main/scripts/extract-events.sh
diff options
context:
space:
mode:
authorLaMont, William(wl2432) <wl2432@att.com>2020-05-29 17:44:43 -0400
committerLaMont, William (wl2432) <wl2432@att.com>2020-07-06 14:41:19 -0400
commitbc565832b7b938a1df10ffa1c2e7c8caa1d71d41 (patch)
tree110a4b436eb0186355bc5e91064631b48fc169c9 /src/main/scripts/extract-events.sh
parentbfeeae6a4964ebacaca933e5453e528ce0abba0f (diff)
update junit to recheck for snapshot file
Issue-ID: AAI-2922 Change-Id: I3ca6189fa6f1eec245f5299c79f052f0fac42be7 Signed-off-by: LaMont, William(wl2432) <wl2432@att.com> Signed-off-by: LaMont, William (wl2432) <wl2432@att.com>
Diffstat (limited to 'src/main/scripts/extract-events.sh')
-rw-r--r--src/main/scripts/extract-events.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/scripts/extract-events.sh b/src/main/scripts/extract-events.sh
new file mode 100644
index 0000000..5a2bb3b
--- /dev/null
+++ b/src/main/scripts/extract-events.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+usage(){
+ echo "Usage $0 input-file output-file event-type";
+}
+
+if [ "${#}" -lt 3 ]; then
+ usage;
+ exit -1
+fi;
+
+input_file=$1
+output_file=$2
+event_type=$3
+
+grep "|${event_type}|" ${input_file} > ${output_file}.1
+sed -i -e '/InvokeReturn/s/^.*$//g' ${output_file}.1
+sed -i '/^$/d' ${output_file}.1
+cat ${output_file}.1 | awk -F '|' '{print $29}' > ${output_file}
+rm ${output_file}.1
+exit 0