diff options
Diffstat (limited to 'src/main/scripts/extract-events.sh')
-rw-r--r-- | src/main/scripts/extract-events.sh | 20 |
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 |