Question: Chat Background We discussed regular expressions in lecture, now we need to work with them. I want to introduce two programs which frequently make use

 Chat Background We discussed regular expressions in lecture, now we need

Chat Background We discussed regular expressions in lecture, now we need to work with them. I want to introduce two programs which frequently make use of them: sed and awk. They are frequently discussed together, as they are both utilities for automatically processing documents. That is, they make changes to documents based on a script or the command-line. They do not need to be ran interactively, Interactive changes to a documentare done using an editor like "vi" or "nano' With these editors, we describe the changes we want made and receive feedback. With "sed' and 'awk. the changes can happen without feedback. This is useful for automating updates to documents, especially when using the output of another program as part of the change. The sed Script Here is an input file The first three lines should be ignored Don't include them in your output So you'll need to tell 'sed' to ignore them This is a comment BEGIN HELLO END so is this! Copy and paste that into anle on your machine, and write a sed'script to turn it into the following include int maint) printf("hello world '); You will need to Delete the first three lines of the input Delete anything after leaving no empty lines behind Convert BEGIN into the Winclude" and "main" lines Convert HELLO Into the "print" Convert END into the trailing "T" Your script should work on similar input files /2710/analo

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!