Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homework Solution #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions mystery/crimescene
Original file line number Diff line number Diff line change
Expand Up @@ -13562,4 +13562,10 @@ with sobs, to sing this:--
Soup of the evening, beautiful Soup!
Soup of the evening, beautiful Soup!
Beau--ootiful Soo--oop!
grep “CLUE” file

grep “CLUE” crimescene
grep “ClUE” Crime Scene

cd ../

219 changes: 162 additions & 57 deletions solution.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,168 @@
```zsh
# Clone the initial repository
git clone [email protected]:eerwitt/command-line-mystery.git
cd command-line-mystery
Joshs-MacBook-Pro:desktop joshseipel1$ cd ga
Joshs-MacBook-Pro:ga joshseipel1$ ls
Homework
Joshs-MacBook-Pro:ga joshseipel1$ cd homework
Joshs-MacBook-Pro:homework joshseipel1$ ls
command-line-mystery
Joshs-MacBook-Pro:homework joshseipel1$ cd command-line-mystery/
Joshs-MacBook-Pro:command-line-mystery joshseipel1$ ls -a
. .git hint1 hint3 hint5 hint7 instructions readme.md
.. cheatsheet.md hint2 hint4 hint6 hint8 mystery solution.md
Joshs-MacBook-Pro:command-line-mystery joshseipel1$

# Check the status to see if anything is already marked as new (shouldn't be)
git status
cat hint1

# Edit my solution file
subl solution.md
Try poking around what's in a file by using the 'head' command:

# Commit initial solution
git add solution.md
git commit -a
head -n 20 people

# Start reading the instructions
less instructions
This will show you the first 20 lines of the 'people' file.Joshs-MacBook-Pro:command-line-mystery joshseipel1$



Joshs-MacBook-Pro:command-line-mystery joshseipel1$ grep -r "CLUE" *
hint2:
grep "CLUE" crimescene

instructions:Fortunately the sergeant went through and marked the real clues with the word "CLUE" in all caps.
mystery/crimescene:CLUE: Footage from an ATM security camera is blurry but shows that the perpetrator is a tall male, at least 6'.
mystery/crimescene:CLUE: Found a wallet believed to belong to the killer: no ID, just loose change, and membership cards for AAA, Delta SkyMiles, the local library, and the Museum of Bash History. The cards are totally untraceable and have no name, for some reason.
mystery/crimescene:CLUE: Questioned the barista at the local coffee shop. He said a woman left right before they heard the shots. The name on her latte was Annabel, she had blond spiky hair and a New Zealand accent.
mystery/crimescene:grep “CLUE” file
mystery/crimescene:grep “CLUE” crimescene
Joshs-MacBook-Pro:command-line-mystery joshseipel1$

Joshs-MacBook-Pro:mystery joshseipel1$
grep "Annabel" people

Annabel Sun F 26 Hart Place, line 40
Oluwasegun Annabel M 37 Mattapan Street, line 173
Annabel Church F 38 Buckingham Place, line 179
Annabel Fuglsang M 40 Haley Street, line 176
Joshs-MacBook-Pro:mystery joshseipel1$

Joshs-MacBook-Pro:memberships joshseipel1$

grep "Annabel" *

AAA:Annabel Church
AAdvantage:Annabel Fuglsang
AAdvantage:Annabel Church
Fitness_Galaxy:Oluwasegun Annabel
Fitness_Galaxy:Annabel Church
Museum_of_Bash_History:Annabel Church
Museum_of_Bash_History:Oluwasegun Annabel
REI:Annabel Church
Rotary_Club:Annabel Sun
Rotary_Club:Annabel Fuglsang
Rotary_Club:Annabel Church



Joshs-MacBook-Pro:mystery joshseipel1$
head -n 173 streets/Mattapan_Street | tail -n 1

SEE INTERVIEW #9437737


License Plate L337DV9
Make: Honda
Color: Blue
Owner: Joe Germuska
Height: 6'2"
Weight: 164 lbs
--

License Plate L3375A9
Make: Honda
Color: Blue
Owner: Jeremy Bowers
Height: 6'1"
Weight: 204 lbs
--

License Plate L337WR9
Make: Honda
Color: Blue
Owner: Jacqui Maher
Height: 6'2"
Weight: 130 lbs


Joshs-MacBook-Pro:command-line-mystery joshseipel1$
ls

cheatsheet.md hint2 hint4 hint6 hint8 mystery solution.md

hint1 hint3 hint5 hint7 instructions readme.md

Joshs-MacBook-Pro:command-line-mystery joshseipel1$

# Check for clues in the mystery
cd mystery
grep CLUE ./crimescene

# Search for person with the Latte
grep Annabel ./people

# Knock on her door
less streets/Mattapan_Street
# Goto line in file using less: http://stackoverflow.com/questions/8586648/going-to-a-specific-line-number-using-less-in-unix
# in less type 173g
# Try different interviews
less interviews/interview-47246024

less interviews/interview-699607

# Checking for vehicle
less vehicles
# Search in less for vehicles starting with L337 and ending in 9
# in less /L337..9
# Check which are over 6'
# Katie Park
# Mike Bostock
# John Keefe
# Erika Owens
# Matt Waite
# Brian Boyer
# Al Shaw
# Miranda Mulligan
# Joe Germuska
# Jeremy Bowers
# Jacqui Maher

# Check which is male/female and get their names
egrep '((Katie Park)|(Mike Bostock)|(John Keefe)|(Erika Owens)|(Matt Waite)|(Brian Boyer)|(Al Shaw)|(Miranda Mulligan)|(Joe Germuska)|(Jeremy Bowers)|(Jacqui Maher))' ./people | grep '\tM\t' | cut -f1

# Limit down by membership
egrep -R '((Joe Germuska)|(Brian Boyer)|(Mike Bostock)|(Jeremy Bowers)|(John Keefe)|(Al Shaw)|(Matt Waite))' ./memberships

# (Jeremy Bowers)|(Brian Boyer)|(Mike Bostock)|(Matt Waite)
# Not MB, wrong car color
# Not MW, wrong car manufacturer
# Not BB, wrong car manufacturer
# JB, it is JB
```

Joshs-MacBook-Pro:mystery joshseipel1$

ls

crimescene interviews memberships people streets vehicles



Joshs-MacBook-Pro:mystery joshseipel1$
grep -rl "Joe Germuska" memberships

memberships/AAA
memberships/Terminal_City_Library

/// Ruled out as a suspect, memberships are not conducive.

Joshs-MacBook-Pro:mystery joshseipel1$
grep -rl "Jeremy Bowers" memberships

memberships/AAA
memberships/Delta_SkyMiles
memberships/Museum_of_Bash_History
memberships/Terminal_City_Library

Joshs-MacBook-Pro:mystery joshseipel1$
grep -rl "Jacqui Maher" memberships

memberships/AAA
memberships/Delta_SkyMiles
memberships/Museum_of_Bash_History
memberships/Terminal_City_Library

Joshs-MacBook-Pro:mystery joshseipel1$
grep -r "Maher" *

interviews/interview-904020:Maher is not considered a suspect.
Video evidence confirms that she was away at a professional soccer game
on the morning in question, even though it was a workday.

memberships/AAA:Jacqui Maher
memberships/Delta_SkyMiles:Jacqui Maher
memberships/Museum_of_Bash_History:Maher Vos
memberships/Museum_of_Bash_History:Jacqui Maher
memberships/TCSU_Alumni_Association:Maher Vos
memberships/Terminal_City_Library:Jacqui Maher

people:Maher Vos M 55 Waltham Street, line 340
people:Jacqui Maher F 40 Andover Road, line 224
vehicles:Owner: Maher Vos
vehicles:Owner: Jacqui Maher


Joshs-MacBook-Pro:mystery joshseipel1$
grep -r "Bowers" *

memberships/AAA:Jeremy Bowers
memberships/Delta_SkyMiles:Jeremy Bowers
memberships/Museum_of_Bash_History:Jeremy Bowers
memberships/Terminal_City_Library:Jeremy Bowers
people:Jeremy Bowers M 34 Dunstable Road, line 284
vehicles:Owner: Jeremy Bowers

/// All memberships point to Jeremy Bowers as the suspect. ///
Solution = "Jeremy Bowers"