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

In Linux, Write a sed command that copied a file to standard output, removing al

ID: 3859059 • Letter: I

Question

In Linux, Write a sed command that copied a file to standard output, removing all lines that begin with the word Today.

2) Write a sed command that copied only those lines of a file that begin with the word Today to standard output.

3) Write a sed command that copies a file to standard output, removing all blank lines (i.e., lines with no characters on them).

4) Write a sed program named ins that copied a file to standard output,changing all occurences of cat to dog angd preceding each modified line with a line that says following line is modified:

5) How can you use sed to triple-space (i.e., add two blank lines after each line in) a file?

Note: Submit the screenshot of the all ques.

Explanation / Answer

1. sed -e '/^Today.*$/d' oldfilename > newfilename

2. sed -n '/^Today/p' oldfilename

3. sed '/^$/d' oldfilename > newfilename

4. $ cat ins
   /cat/ i
s/cat/dog/g

5. sed -e 'G;G' oldfilename

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