Skip to content

Instantly share code, notes, and snippets.

@wpc009
Last active February 1, 2016 07:13
Show Gist options
  • Select an option

  • Save wpc009/b05e281fec6c6f027e25 to your computer and use it in GitHub Desktop.

Select an option

Save wpc009/b05e281fec6c6f027e25 to your computer and use it in GitHub Desktop.
Suspects finding scripts for clmystery
#!/bin/bash
IFS=$'\n'
suspects=( $(grep -A 6 L337 vehicles | grep -A 5 Honda | grep -A 4 Blue | grep -B1 "Height: 6'" | grep Owner | awk '{ print $2 " " $3}') )
for s in ${suspects[@]};do
#echo $s
m=$(grep $s memberships/AAA memberships/Museum_of_Bash_History memberships/Terminal_City_Library memberships/Delta_SkyMiles | wc -l)
echo $s,$m
if [ $m -eq 4 ];then
echo -e "\e[;33m Suspect \e[;31m$s\e[;0m"
echo "-------------------------------------"
i=$(eval $(grep "$s" people | awk '{ print "head -n "$8" streets/"$5"_"$6" | tail -n 1" }' | sed s/,//) | awk '{ print $3 }' | sed s/#//)
cat interviews/interview-$i
echo "-------------------------------------"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment