- #1
alice06
- 6
- 0
Hi all
30 students have sent me their answers to me in folders, "name1", "name2", ..., "name30".
Each folder contains 2 outputs, "output_a.txt" and "output_b.txt"
Now I have the correct answer "correct_a.txt" and "correct_b.txt" with me.
I know that using the command diff, I can compare 2 files ::
But how do I make a shell script that goes inside each folder "namei" (say for the ith student) and compares the outputs "output_a.txt" and "output_b.txt" with the corresponding correct answers "correct_a.txt" and "correct_b.txt"
AND generate a file "scorei.txt" (say, for the ith student) that will tell me which of their answers is correct and which is wrong.
PLEASE HELP ME OUT, SINCE I NEED TO CHECK THEM URGENTLY
regards
Alice
30 students have sent me their answers to me in folders, "name1", "name2", ..., "name30".
Each folder contains 2 outputs, "output_a.txt" and "output_b.txt"
Now I have the correct answer "correct_a.txt" and "correct_b.txt" with me.
I know that using the command diff, I can compare 2 files ::
Code:
$ diff correct_a.txt output_a_.txt
But how do I make a shell script that goes inside each folder "namei" (say for the ith student) and compares the outputs "output_a.txt" and "output_b.txt" with the corresponding correct answers "correct_a.txt" and "correct_b.txt"
AND generate a file "scorei.txt" (say, for the ith student) that will tell me which of their answers is correct and which is wrong.
PLEASE HELP ME OUT, SINCE I NEED TO CHECK THEM URGENTLY
regards
Alice