Skip to content

Commit

Permalink
Merge pull request #1 from lisafeeney33/assignment1
Browse files Browse the repository at this point in the history
Assignment1
  • Loading branch information
lisafeeney33 authored Aug 25, 2024
2 parents c803a50 + 8eb2f2d commit 3b412bf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions 02_activities/assignments/assignment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,25 @@ set -x
# > Add your code below each comment to complete the tasks

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

# 2. List the contents of the parent directory to verify the presence of the 5 directories
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

# 4. Append the words "Hello world" to dir2/file3
echo "Hello World" >> dir2/file3.txt

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

# 6. Delete file4
rm_ dir2/file4

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

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

0 comments on commit 3b412bf

Please sign in to comment.