Guest User

Untitled

a guest
Mar 21st, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # get clues
  4. grep CLUE crimescene
  5.  
  6. # clue mentioned Annabel
  7. grep Annabel people | \
  8. cut -s -f 4 | \
  9. cut -d ' ' -f1-2,4 | \
  10. sed 's/ /_/' | \
  11. sed 's/,//' | \
  12. while read line;do
  13. # n the streets file you can find a SEE INTERVIEW line
  14. head -n `echo $line | cut -d' ' -f2` `echo streets/$line | cut -d' ' -f1` | tail -n 1 | sed 's/SEE INTERVIEW #//';
  15. done | \
  16. while read line;do
  17. cat interviews/interview-$line;
  18. done;
  19.  
  20. # Annabel were talking about a Blue Honda
  21. # Other clue mentioned about a guy who is at least 6' tall
  22. grep 'Honda' vehicles -A 4 -B 1 | grep 'Color: Blue' -B 2 -A 4 | \
  23. grep 'L337.*9' -A 5 | grep 'Height: 6' -A 1 -B 5 | grep 'Owner' | cut -d ' ' -f2- | \
  24. while read user;do
  25. # Clue talking about membership, suspect must be member of all of the 4 groups
  26. if [ "`grep "$user" memberships/AAA memberships/Museum_of_Bash_History memberships/Delta_SkyMiles memberships/Terminal_City_Library | wc -l`" -eq 4 ]; then
  27. grep "$user" people;
  28. fi;
  29. done | \
  30. # The guy has to be male
  31. while read line;do
  32. if [ "`echo $line | cut -d ' ' -f3`" = "M" ];then
  33. echo $line | cut -d ' ' -f1,2
  34. fi
  35. done
Add Comment
Please, Sign In to add comment