I have a text file as the input file, I would like to generate a csv or text file, each line has only class name, student id, score,average. Basically, I want to collect these four type information only and standardize them. There will be many classe blockes in the input file, each class block will have many students. The number of classes and students are Not fixed. The followings are just an example.
Any suggestion on how to write a script on windows to read through the input file and generate the output file.
output file
"math, 55, 4, 4.5
math, 34,3,4.5
science, 56, 4,4"
Input file
"
this is a report of classes:
class name: math
student id=55, score=4
student id=34,score=3
Average is 4.5
here are some cooments on this class
therer are another class
class name: science
student id=56, score=4
average is 4
this may the end of report"