Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Linux write the execute function listed here. starting at number 2, assume that all necessary files exist execute (O) 1. Uncomment the line execute

In Linux write the execute function listed here. starting at number 2, assume that all necessary files exist

image text in transcribed

execute (O) 1. Uncomment the line execute in the Main program 2. Extract the executable (second part) of the .info file using cat and cut 3. Use a for loop and command substitution for loop through all files that begin with .input o Increase the number_of_runs by 1 o echoRUN xwhere X is the number of runs o Extract the number at the end of input into a variable Create a variable out-file that is ".run" followed by the number we just extracted. o Create a variable answer_file that is ".output" followed by the number we just extracted. o If the answer file does not exist echo "No matching output file for input Increase skipped_runs by 1 continue o Eval the executable and redirect the input file to stdin and stdout to out_file write a test to see if the previously run command was successful If so, echo Success! and increase success_runs by 1 Othenwise, echo Falure and increase failed runs by 1 Echo the successruns / num ofruns succeeded so far. - - execute (O) 1. Uncomment the line execute in the Main program 2. Extract the executable (second part) of the .info file using cat and cut 3. Use a for loop and command substitution for loop through all files that begin with .input o Increase the number_of_runs by 1 o echoRUN xwhere X is the number of runs o Extract the number at the end of input into a variable Create a variable out-file that is ".run" followed by the number we just extracted. o Create a variable answer_file that is ".output" followed by the number we just extracted. o If the answer file does not exist echo "No matching output file for input Increase skipped_runs by 1 continue o Eval the executable and redirect the input file to stdin and stdout to out_file write a test to see if the previously run command was successful If so, echo Success! and increase success_runs by 1 Othenwise, echo Falure and increase failed runs by 1 Echo the successruns / num ofruns succeeded so far

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions