Simple SHELL (.sh) script Write a SHELL script (minExF.sh) that takes a csv file ("Comma Separated Values", a text file that can be manipulated by Excel) as an argument containing the grades of the mid-term (called intra) exams with the passing thresholds and calculates the minimum grades that must be obtained in the Final exam by adding them as a column to the initial information in the output file. Note: To manipulate large integers and real numbers use the Unix command bc . Here is an example of how to use of this command to add two non-integer numbers stored in the variables VAR1 and VAR2 : VAR1=5.5 VAR2=3.14159 RESULT='echo $VAR1+$VAR2 | bc' echo $RESULT The result displayed on the screen will be 8.64159. The first line contains titles (mid-terms, weight mid-term, weight final, treshold). The following lines contain information about the Intra (mid-term) exam scores, exam weights and weighting of the exams and the cut-off points for the two exams, Intra (mid-term) and Final.
Simple SHELL (.sh) script
Write a SHELL script (minExF.sh) that takes a csv file ("Comma Separated Values", a text file that can be manipulated by Excel) as an argument containing the grades of the mid-term (called intra) exams with the passing thresholds and calculates the minimum grades that must be obtained in the Final exam by adding them as a column to the initial information in the output file.
Note: To manipulate large integers and real numbers use the Unix command bc . Here is an example of how to use of this command to add two non-integer numbers stored in the variables VAR1 and VAR2 :
VAR1=5.5
VAR2=3.14159
RESULT='echo $VAR1+$VAR2 | bc'
echo $RESULT
The result displayed on the screen will be 8.64159.
The first line contains titles (mid-terms, weight mid-term, weight final, treshold). The following lines contain information about the Intra (mid-term) exam scores, exam weights and weighting of the exams and the cut-off points for the two exams, Intra (mid-term) and Final.


Step by step
Solved in 5 steps









