The magic black screen: Command line
My first week at Makers Academy Bootcamp
Command-Line is excellent, and I don’t need a mouse for anything!

Creating folders and files, moving them, deleting them or going from one directory to another with just simple commands is surreal.
I’ve learned how to use head, tail and less to read documents.
head -N for the first N lines
tail -N for the last N lines
I use * to say “only”
I can concatenate files using cat file 1 file 2 > file 3 (also put them in another file)
This week I had the opportunity to be a detective and unravel a mystery
Using command line
The week’s challenge was to find the murderer of the crime with only three clues. One of the clues had the name of a witness I researched, among thousands of residents hidden in a file with more than 5 thousand lines and totally out of order.

With the command line, it was possible to find the addresses of two witnesses with the same name. The one I was looking for was blonde and had a New Zealand accent.
The addresses were also confusing. It was a folder with about 200 files that were the names of each street.
And inside each file (street), there were around 300 lines which was the complete address I needed.
Some commands like “grep” and “find” were essential to find these addresses in Terminal City.
Upon arriving at the witnesses’ address, there was a reference to an interview. The Interview Folder had another hundred interviews. After finding the proper discussions, I discovered that one of them wasn’t home, and her neighbour said she didn’t have a New Zealand accent, so I dismissed her. The next one was correct! She told me she saw the killer’s car. She knew the colour, the model, the first four numbers on the license plate and the last number.

OMG, now I have almost everything I need to find this person! 🚔
I had a look at my clue pad, and another exciting thing I found was the killer’s height and gender.
We have a registration list of all cars in Terminal City showing the vehicle’s model, colour, license plate, owner’s name, and height and weight measurements.
Let’s look at the car registration — a file with more than 35 thousand lines. I need a command that finds precisely the keywords together.
The command line has everything I need and I used:
“grep -A”;
“grep -B”;
“grep -C”;
|
I quickly got to 4 suspects who had the same cars and similar heights.
Of the four suspects, two were of the opposite gender to the one I was looking for, so I have only two suspects left.
Let’s take a look at the last clue: the assassin left behind a wallet with some membership cards. There was no identification, but we knew which stores had these people as members.

I went to every store and asked for their member reports. Each had a gigantic list of all the names of its members. Now it’s easy. If the killer has their name on all of them, I got it!
Initially, I joined all the files with the member names.
Then I counted how many times the suspect’s name appeared. The number of times had to be equal to the number of cards found. I also used the command “|”, “grep” and “wc” that counts the number of words.
The first suspect was a member of only two memberships, and the second was a member of all.
Let’s arrest this bastard!
“You have the right to remain silent. Anything you say can and will be used against you in a court of law”.
