This Bash script is designed to automate the grading process for student submissions. It checks for correct submission formats, runs student scripts, and grades based on output differences compared to a golden output file.
Creates a grading directory if it doesn't already exist.
Ensures that exactly 3 parameters are provided, including the maximum grade, the correct output file, and the submission folder.
Checks if the submission folder exists and is not empty, and if the correct output file exists.
Makes student scripts executable if they are not already.
Verifies that student script filenames follow the correct format.
Limits script execution time to 60 seconds, logging any timeouts.
Compares student script output to a golden output file and calculates grades based on differences.
./grading_script.sh <max_grade> <golden_output_file> <submission_folder>