我需要它帮助 shell 脚本、python 脚本或任何可以做到这一点的东西。我想创建一个脚本,可以将以下信息从“txt”文件解析为 csv。我需要为我的在线成绩册解析的信息是获取用户名和实验室分数。实验室分数可以在这条线上找到
Your score for this lab: 20/20
并且用户名可以在这一行找到
Student: username0
感谢您阅读和帮助我!
这是文件 test.txt 的示例
Student: username0
Your score for this lab: 20/20
Score Breakdown:
info...
Part 1:
Part 2:
Part 3:
------------------------------------------------
------------------------------------------------
------------------------------------------------
Student: username1
Your score for this lab: 20/20
Score Breakdown:
info...
Part 1:
Part 2:
Part 3:
------------------------------------------------
------------------------------------------------
------------------------------------------------
Student: username2
Your score for this lab: 20/20
Score Breakdown:
Part 1:
Part 2:
Part 3:
------------------------------------------------
------------------------------------------------
------------------------------------------------