From c911547699d7c12bd5cd188cbef829d159128d1a Mon Sep 17 00:00:00 2001 From: Rejindael Date: Fri, 23 Aug 2024 15:11:26 -0400 Subject: [PATCH 1/2] final update --- 02_activities/assignments/assignment.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 28faf46ea..0e3eee2e4 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -14,11 +14,12 @@ ls # 3. Create 5 text files in dir2 named file1.txt, file2.txt, file3.txt, file4.txt, and file5.txt touch file1.txt/dir2 file2.txt/dir2 file3.txt/dir2 file4.txt/dir2 file5.txt/dir2 # 4. Append the words "Hello world" to dir2/file3.txt - +echo "Hello world" >> dir2/file3.txt # 5. Verify that file3.txt contains the words "hello world" by printing the contents of the file in the terminal - +cat file3.txt # 6. Delete file4.txt - +rm file4.txt # 7. Delete directories dir4 and dir5 including all their contents (if any) - +rm -rf dir4 dir 5 # 8. List the contents of the current working directory to verify the deletion of dir4 and dir5 +pwd \ No newline at end of file From 841b1695e48c8b92bc940335565f5fce971ae8bb Mon Sep 17 00:00:00 2001 From: Rejindael Date: Fri, 23 Aug 2024 15:21:14 -0400 Subject: [PATCH 2/2] final update --- 02_activities/assignments/assignment.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 0e3eee2e4..ca8cc88fb 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -12,14 +12,14 @@ mkdir dir1 dir2 dir3 dir4 dir5 # 2. List the contents of the current working directory to verify the presence of the 5 directories ls # 3. Create 5 text files in dir2 named file1.txt, file2.txt, file3.txt, file4.txt, and file5.txt -touch file1.txt/dir2 file2.txt/dir2 file3.txt/dir2 file4.txt/dir2 file5.txt/dir2 +touch dir2/file1.txt dir2/file2.txt dir2/file3.txt dir2/file4.txt dir2/file5.txt # 4. Append the words "Hello world" to dir2/file3.txt echo "Hello world" >> dir2/file3.txt # 5. Verify that file3.txt contains the words "hello world" by printing the contents of the file in the terminal -cat file3.txt +cat dir2/file3.txt # 6. Delete file4.txt -rm file4.txt +rm dir2/file4.txt # 7. Delete directories dir4 and dir5 including all their contents (if any) -rm -rf dir4 dir 5 +rm -rf dir4 dir5 # 8. List the contents of the current working directory to verify the deletion of dir4 and dir5 pwd \ No newline at end of file