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

Assignment1 -Secret Password #4

Open
wants to merge 2 commits into
base: main
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
18 changes: 17 additions & 1 deletion 02_assignments/assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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



Expand Down
20 changes: 12 additions & 8 deletions 03_homework/homework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./