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

Update assignment.sh based on the feedback #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
34 changes: 17 additions & 17 deletions 02_activities/assignments/assignment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,42 @@ set -x

# 1. Create 5 directories named dir1, dir2, dir3, dir4, and dir5

[TL] mkdir dir1 dir2 dir3 dir4 dir5
mkdir dir1 dir2 dir3 dir4 dir5

# 2. List the contents of the parent directory to verify the presence of the 5 directories

[TL] ls
ls

# 3. Create 5 text files in dir2 named file1, file2, file3, file4, and file5

[TL] pwd
ls
cd dir2
touch file1.txt file2.txt file3.txt file4.txt file5.txt
ls
pwd
ls
cd dir2
touch file1.txt file2.txt file3.txt file4.txt file5.txt
ls

# 4. Append the words "Hello world" to dir2/file3

[TL] echo "Hello world" > file3.txt
cat file3.txt
echo "Hello world" >> dir2/file3.txt
cat dir2/file3.txt

# 5. Verify that file3 contains the words "hello world" by printing the contents of the file in the terminal

[TL] ls
cat file3.txt
ls
cat dir2/file3.txt

# 6. Delete file4

[TL] rm -i file4.txt
ls
rm -i dir2/file4.txt
ls

# 7. Delete directories dir4 and dir5 including all their contents (if any)

[TL] rm -r dir4 dir5
ls
rm -r dir4 dir5
ls

# 8. List the contents of the parent directory to verify the deletion of dir4 and dir5

[TL] pwd
ls
pwd
ls