Question: -Begin by copying your assignment from last week which prints Hello Your Name. To copy a file and rename you can use the cp command

-Begin by copying your assignment from last week which prints "Hello Your Name".
To copy a file and rename you can use the cp command cp "filetobecopied" "newfilename"
-In your new copy modify the echo statement and add the following to the end > hello.txt
Save and run this new program. Notice you no longer have any output to the screen. You have a new file named hello.txt
! Turn this .sh into this assignment.
-Create another copy of your assignment from last week which prints "Hello Your Name".
In this new copy modify the echo statement and add the following to the end > hello_new.txt now add another line below which looks like the following:
echo "I am a new line" > hello_new.txt
Save and run this new program. It should now contain 3 lines. Notice you no longer have any output to the screen. You have a new file named hello_new.txt When you look inside hello_new.txt notice all you see is I am a new line. This is because we are not doing an append, but overwriting the contents of the file.
! Turn this .sh into this assignment.
-Create a copy of your previous .sh file that creates hello_new.txt
In this copy change both of the > to >> and hello_new.txt to hello_append.txt
Save and run this new .sh file.
Notice you no longer have any output to the screen. You have a new file named hello_append.txt When you look inside hello_append.txt notice you see both of your echo statements since we are now appending them to the file.
! Turn this .sh into this assignment.
You will need to turn in 3 .sh files to receive full credit!!
This was all the information that I was provided, I apologize if it isnt enough

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!