OPA JULY 24 Unix
Student details are stored in a file in the following format . Fields in the file are separated by comma(,).
Note: The roll number of the students is unique.
Write the Unix command to print the roll numbers of the students who has failed in only one subject. A student is considered as fail if the score is less than 60. One student might have multiple records in the file if the has scored for more than one subject.
In the output display only the roll numbers . In case no such students found there will not be any output.
Refer the example below for more clarity on input and output format.
The file name input will be provided as command line argument when the script containing your command will run.
You can use shell variables (e.g. $05152) whichever is applicable for your requirement to provide the command line argument.
If the input file has following data:
Here the above output related students have failed only in one subject
Try in online compiler -> click here