#!/bin/bash # # This method finds all instances of each UUID in the codebase. # audit_dir=$(cd $(dirname ${0}); pwd) root=$(dirname $(dirname ${audit_dir})) cat ${audit_dir}/audit_events.csv | tail -n +2 | while read r; do uuid=$(echo $r | awk -F "," '{print $1;}') desc=$(echo $r | awk -F "," '{print $2;}') echo "===================================" echo "===================================" echo ${desc} ${uuid} echo "" grep -C 3 -R --include "*.go" "${uuid}" "${root}" done