Question: 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
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
Get step-by-step solutions from verified subject matter experts
