Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

/ * print the result * / printf ( The result is of , num 1 * num 2 ) ; / *

/* print the result */
printf("The result is of
", num1* num2); /* this does it */
/* does it work? */
return 0 ;
}
Answer:
b) Consider the following file called phone.txt containing some DFW area phone
numbers, except that the area code (i.e., the first three digits) are backwards and do
not include the parentheses around the area code as follows:
Write a single sed script called minor3. sed that does the following:
Removes the phone number beginning with 412(i.e., really the number with
the 214 area code).
Reverses the order of the three digits in the area code and adds the needed
parentheses around the area code.
Appends your phone number (you can make one up if you want) after the
number beginning with 718(i.e., the last phone number in the file).
In this file, for example, my sed script should print the following:
$ sed-r -f minor3.sed phone.txt
(972)680-0035
(469)432-8492
(817)780-4972
(940)369-7055
This sed script file will be submitted to Canvas.
image text in transcribed

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

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

Students also viewed these Databases questions