Question: 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

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