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 #2

Open
wants to merge 6 commits 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
13 changes: 9 additions & 4 deletions 02_activities/assignments/assignment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ mkdir dir1 dir2 dir3 dir4 dir5
ls

# 3. Create 5 text files in dir2 named file1, file2, file3, file4, and file5
dir2/ Touch file1.txt file2.txt file3.txt file4.txt file5.txt
cd dir2/
touch file1.txt
touch file2.txt
touch file3.txt
touch file4.txt
touch file5.txt

# 4. Append the words "Hello world" to dir2/file3
echo "Hello World" >> dir2/file3.txt
Expand All @@ -23,10 +28,10 @@ echo "Hello World" >> dir2/file3.txt
cat dir2/file3.txt

# 6. Delete file4
rm_ dir2/file4
rm dir2/file4.txt

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

# 8. List the contents of the parent directory to verify the deletion of dir4 and dir5
ls /dir4 dir 5
ls dir4 dir5