forked from makersacademy/clmystery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
88 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# `head` | ||
|
||
`head -N` command will print out first N lines of the file. | ||
|
||
# `tail` | ||
|
||
`tail -N` is the opposite of `head`. It will print out last N lines of the file. | ||
|
||
# `|` | ||
|
||
The pipe operator - `|` - allows you to "pipe" or direct the output of one command into the input of another command. For example if you wish to search for "British" in 'kitties.txt' and then search for "Shorthair" in the results of the first search you can use the combination of `grep` and `|`: | ||
|
||
`grep British kitties.txt | grep Shorthair` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Try poking around what's in a file by using the 'head' command: | ||
Try poking around the contents of a file by using the 'head' command: | ||
|
||
head -n 20 people | ||
|
||
This will show you the first 20 lines of the 'people' file. | ||
|
||
Try to search for 'Annabel' in the 'people' file. | ||
Try to search for 'Annabel' in the 'people' file. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
Reference: ./reference/step1.md | ||
Reference: ./detective_handbook/step1.md | ||
|
||
Now it's time to collect the clues! The officers on the scene are pretty meticulous, so they've written down EVERYTHING in their officer reports. Take a look at the 'mystery/crimescene' file. It's quite large so use `less` command to view the contents of the file one screen at a time. | ||
Now it's time to collect the clues! The officers on the scene are pretty meticulous, so they've written down EVERYTHING in their officer reports. Take a look at the 'mystery/crimescene' file. It's quite large so use the `less` command to view the contents of the file, one screen at a time. | ||
|
||
|
||
#### Challenge #### | ||
############ Challenge ############### | ||
|
||
How can you view the file in another directory without switching to the directory first? What is the difference between absolute paths and relative paths? | ||
How can you view a file in different directory without switching to that directory first? What is the difference between absolute paths and relative paths? | ||
|
||
################### | ||
###################################### | ||
|
||
|
||
You need to search for the lines in the file marked with the word 'CLUE'. Use the `grep` command to do that. | ||
|
||
Once you found all the clues it's time to save them to a separate file for the future reference. | ||
You need to search for lines in the file marked with the word 'CLUE'. Use the `grep` command to do this. | ||
|
||
Once you've found all the clues it's time to save them to a separate file for future reference. | ||
|
||
Use `touch` to create a file named 'clues.txt'. Use `>` to save the output of the `grep` command to the 'clues.txt' file. | ||
|
||
That's the first step done! Open 'step1-git' to see how you can track your work with version control system. | ||
That's the first step done! Open 'step1-git' to see how you can track your work using a version control system (git). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
Take a look inside your 'clues.txt'. What does the third clue tell you? What are the files in the 'mystery' directory you should look next based on this clue? | ||
Take a look inside your 'clues.txt'. What does the third clue tell you? Within the 'mystery' directory, which files should you look at, based on this clue? | ||
|
||
|
||
#### Challenge #### | ||
############ Challenge ############### | ||
|
||
Sometimes you don't want to see the whole file, but just to peek inside it to get the idea of what the content is. Research `tail` and `head` commands. Try these commands on the files in the 'mystery' directory. | ||
Sometimes you don't want to see the whole file, but just peek inside it to get an idea of the content. | ||
Research the `tail` and `head` commands. Try these commands on the files in the 'mystery' directory. | ||
|
||
################## | ||
###################################### | ||
|
||
|
||
Now you know all the commands you need to find this mysterious woman. | ||
Now you know all of the commands you'll need to find the mysterious woman. | ||
|
||
Create a file called 'possible_witnesses.txt' containing the list of all women matching the barista's description and their addresses. Commit and push the file to Github. | ||
Create a file called 'possible_witnesses.txt' containing a list of all women matching the barista's description and their addresses. | ||
Commit and push the file to Github. | ||
|
||
If you get stuck look inside 'hint1' | ||
|
||
Once you've done that go to step3. | ||
Once you've done that go to step3. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
Reference: ./reference/step3.md | ||
Reference: ./detective_handbook/step3.md | ||
|
||
You got 4 matches for the name Annabel. Only 2 of them are women so you can rule out the other 2. Another piece of information you have is their addresses. There is a 'streets' subdirectory in a 'mystery' directory with a list of files named after streets. | ||
You found 4 matches for the name 'Annabel'. Only 2 of them are women so you can rule out the remainder. Another piece of information you have is their address. There is a 'streets' subdirectory in the 'mystery' directory with a list of files named after streets. | ||
|
||
#### Challenge #### | ||
############ Challenge ############### | ||
|
||
See if you can find files matching street names for two remaining Annabels. Use the combinations of commands from the reference to the step 3 to do this. | ||
See if you can find files matching street names for two remaining women named 'Annabel'. Use the combinations of commands from the Detective Handbook (section step3) to do this. | ||
|
||
################### | ||
###################################### | ||
|
||
Take a look inside the files you've found. Remember you have a lane number in your 'possible_witnesses.txt' too. See if you can figure out how you can find something useful in those files using this information. | ||
|
||
If you get stuck look into hint2. | ||
Take a look inside the files you've found. REMEMBER: among the information available in 'possible_witnesses.txt', you have references to line numbers. See if you can use that line number to discover something useful about the lady called 'Annabel'. | ||
|
||
If you get stuck check out hint2. | ||
|
||
Move on to step4. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
Reference: ./reference/step4.md | ||
Reference: ./detective_handbook/step4.md | ||
|
||
#### Challenge #### | ||
############ Challenge ############### | ||
|
||
Use the combination of head, tail and | operator to view exactly the line you're interested in. | ||
Use the combination of `head`, `tail` and `|` operators to view exactly the line you're interested in. | ||
|
||
################## | ||
###################################### | ||
|
||
|
||
Save the contents of this line in both address files to a file named 'interviews.txt', commit it and push to Github. | ||
You have two addresses to investigate. Create a file for your reference called `interviews.txt`. Find the relevant line in each of the two address files, and save the contents to 'interviews.txt'. Commit it and push to Github. | ||
|
||
Now let's move to step5. | ||
Now let's move to step5. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
Reference: ./reference/step5.md | ||
Reference: ./detective_handbook/step5.md | ||
|
||
To get to this step `git checkout` the 'step-5' branch and try to visit this file again. | ||
You're concerned that the investigation has been compromised. You use an old detective's trick to cover your tracks. | ||
|
||
To get to this step use the `git checkout` command to check out the 'step-5' branch, and try to view this file again. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
Reference: ./reference/step7.md | ||
Reference: ./detective_handbook/step7.md | ||
|
||
Now you're down to 4 suspects. First, remove all files you've created but 'clues' and 'suspects', you don't need them anymore. | ||
|
||
|
||
#### Challenge #### | ||
############ Challenge ############### | ||
|
||
How can you tell what files you've added? Can you use git to see the changes between one commit and another? | ||
|
||
################### | ||
###################################### | ||
|
||
|
||
Move on to step 8. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters