From 3b2e1d13d8cdda539f01761a0e4d71bbc24afb6d Mon Sep 17 00:00:00 2001 From: Jyoti Narang Date: Wed, 21 Aug 2024 20:33:26 -0400 Subject: [PATCH] Fixed the file extension --- 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 e678105e..1c907e23 100755 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -12,13 +12,13 @@ set -x # 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 - for f in file{1..5}; do touch dir2/$f; done + for f in file{1..5}; do touch dir2/$f.txt; done # 4. Append the words "Hello world" to dir2/file3 - echo "Hello world" >> 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 + 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) for dir in dir{4..5}; do rm -r "$dir"