Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

14. We want to replace all instances the string \"the Ohio State University\" wi

ID: 3706643 • Letter: 1

Question

14. We want to replace all instances the string "the Ohio State University" with "THE Ohio State University" from the file degrees.txt. What is wrong with the following sed statement? sed 's/the Ohio State University/ THE Ohio State University/' degrees.txt 15. Assume data.txt consists of rows of employee information where each employee is denoted by last name, first name, hours worked, hourly wages. Write an awk command to output the last name and hourly wages of all employees who worked exactly 40 hours.

Explanation / Answer

Solution:

Note: The first question is done as per Chegg guidelines, please repost others. ?

To replace the occurrence of a word or sentence in the file the sed command must of this format

so -i was missing here.

which means in place

s is for the substitude command

the rest is fine.

I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote