Question: The following code can be used as a starting point You will write a C++ program for the following tasks Every System Administrator sooner or

The following code can be used as a starting point


You will write a C++ program for the following tasks Every System Administrator sooner or later has to write a program to run a command (e.g., traceroute) and to extract some data or information from the output of the command. Your C++ program should run the command (traceroute) and produce the output in a file, to be read and processed to extract some of the information from the output of the command You name your program mytrace.cpp for source and mytrace for executable Partl Your program is to run a command (traceroute) via system call, to produce its output to a file See the sample output of traceroute command given below See the sample program (trace0.cpp) given below, and you may use some of this sample code to your program. Part2 Your program is to read the output file (Part1) line by line, to extract the following 5 data items from each line IP addresses, DNS names, 3 time-measure of packets (for min, max, average time) and print these information to the console with headings (formatted and aligned) IP address DNS name Time: (min), ...(max), (average)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
