diff --git a/02_assignments/assignment.md b/02_assignments/assignment.md index aa9d037a..7960206a 100644 --- a/02_assignments/assignment.md +++ b/02_assignments/assignment.md @@ -21,11 +21,22 @@ Checklist: You are stuck in a virtual room and can only leave if you figure out the password! Fortunately, somebody left behind 6 clues for you to find the secret password, but the messaging is not that clear. It is your job to discover what the secret password is! 1. The very odd and inedible ingredient in a cake recipe +$ cat *.txt ./02_assignments/clues/"food\cake" 2. The season number that contains only 18 episodes (Hint: How do you list them?) +$ ls shows/friends/season* 3. Fifth word of Season 6, Episode 21 of Friends +$ cat shows/friends/season_6/ep_21.txt +The One Where Ross Meets Elizabeth's Dad 4. Fifth word of the fifth fictional Space Wars series +$ cat movies/space_wars/fifth_movie.txt +Space Wars: Future Legends and Past Legacies 5. Second word of this song that's exactly 4 minutes long in this "colour" album +cat song* albums/red/ +Title: The Lucky One +Duration: 4:00 6. The fourth word to the fourth Hunger Games movie +$ cat movies/hanger_games/*4.txt +Hanger Games & the Stars of Darkness ## Instructions 1. Fork this Shell learning module repository following these [instructions](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md#setting-up) @@ -35,7 +46,12 @@ You are stuck in a virtual room and can only leave if you figure out the passwor **What is the secret password?** ``` Your answer here... - +Paper Rings +10 +Elizabeth's +and +Lucky +the diff --git a/03_homework/homework.sh b/03_homework/homework.sh index 04b94726..6f7e3b85 100644 --- a/03_homework/homework.sh +++ b/03_homework/homework.sh @@ -7,21 +7,25 @@ # On your terminal, input all the commands you have used to create the following: # 1. How would you create 5 directories? Feel free to use any name for your directories. - +mkdir dir1 dir2 dir3 dir4 dir5 # 2. How would you verify the creation of all 5 directories? - +ls # 3. In each directory, how would you create 5 .txt files and write "I love data" into each within the directories? - +echo "I love data" > file.txt +cp file.txt file.txt ./dir1 ./dir2 ./dir3 ./dir4 ./dir5 # 4. How would you verify the presence of all 5 files? - +ls dir1/ dir2/ dir3/ dir4/ dir5/ # 5. How would you append to one of the existing files " and machine learning!"? - +echo " and machine learning!" >> ./dir1/file.txt # 6. How would you verify that the text was indeed appended to the existing file? - +cat dir1/file.txt # 7. How would you delete all files except for the one with the appended text? +$ grep -o 'machine learning' *.txt +rm ./dir1/file.txt # 8. How would you navigate back to the parent directory containing all the directories? - +cd ~/. # 9. How would you remove each directory along with its contents? - +rm -r ./dir1 ./dir2 ./dir3 ./dir4 ./dir5 # 10. How would you verify that all directories and files have been deleted? +ls ./ \ No newline at end of file