Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I. You will now write a small program consisting of many sed commands. 1. Suppose you have a file named calendar in which you keep

I.You will now write a small program consisting of many sed commands.

1.Suppose you have a file named calendar in which you keep your schedule. Within the file, you have various abbreviations you would like to expand. In particular, you want to change mon to Monday.

Write the sed command to do so:

2.However, you also want to change tue to Tuesday. This requires two separate sed commands, both of which must be preceded by the e option.

Write the single-line sed command to perform the two tasks

3.Now you can see the pattern. Youre going to need seven separate sed commands, one for each day of the week. This would require a very long sed command line.

The best way to enter a very long command is to break it onto multiple lines. All you have to do is type a \ (backslash) before you press the key. The backslash quotes the newline, which allows you to break the command onto more than one line.

Using the \ to quote the newline, Write the long sed command that changes all the abbreviations for all seven days of the week in the file calendar and save it in a file called instructions.sed. Your program should show each sed command on its own line.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions

Question

Prepare a constructive performance appraisal.

Answered: 1 week ago

Question

List the advantages of correct report formatting.

Answered: 1 week ago