My dummy file looks like this:
>Tom text text text, year = 16 text text text Grades . . . . 10 Grades . . . . 9 >Ann text text text, year = 17 text Grades . . . . 10 Grades . . . . 10 Grades . . . . 9
I want to:
For each name, assign a value, specify the year and last number in the classes. To output as follows:
1 Tom 1 year = 16 1 10 1 9 2 Ann 2 year = 17 2 10 2 10 2 9
I donβt know how I can change the text from the record to the next record. It may be possible grep '^>' -An , but the line number is different for each entry.
source share