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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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.

Intras, Pondération Intra, Pondération Final, Seuils
56, 25, 35, 50
34, 30, 30, 50
56, 25, 35, 45
Transcribed Image Text:Intras, Pondération Intra, Pondération Final, Seuils 56, 25, 35, 50 34, 30, 30, 50 56, 25, 35, 45
Expert Solution
steps

Step by step

Solved in 5 steps

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education