OPS435 Week 8
Write a portable Bash Shell script called getStats.bash that uses a valid file pathname as the first argument.
If there is not exactly one argument after your command, you will display a USAGE error message and exit the shell script with a false value. If there is one argument, but it is NOT a valid regular file, then you will display an error message, and exit the shell script with a false value.
If there is exactly one argument after your command, and it contains a valid regular file pathname, your shell script is designed to count the number of students enrolled in your sections a, b and c of the course ops435.
Refer to sample run below for data file format and command runs....
Sample Runs (Commands or shell script appears in bold)
USAGE: ./getStats.bash [datafile]
Filename "nofile.txt" does not exist
Section A: 4
Section B: 3
Section C: 9