It then processes every readable markdown (.md) file within the specified directory,
assuming these files represent descriptions of a set of test cases and seeking to
extract a test case ID and test case name from the file.
The ID is expected to be a single word on a line of the form
## ID: someword
The name is expected to be a single word on a line of the form
## Name: anotherword
The script finds the first such ID line and the first such name line, and generates the following
text output:
| someword | anotherword | thedirectoryname/thefilename |
(though of course with the actual id, name, directory name, and file name for that
particular case).
For example, suppose the script was run on the directory "mycases" (i.e. bonus.sh mycases)
which contained four files:
- errbdform.md: contains a line with id E003 and a line with name BadFormat
- messedup: not of the form considered by the script
- valnorm.md: contains a line with id TN01 and a line with name ValidBasic
- valnull.md: contains a line with id TN00 and a line with name ValidEmpty
Then the output of the script would be the following text:
| TestID | TestName | TestFile |
| ------ | -------- | -------- |
| E003 | BadFormat | mycases/errbdform.md |
| TN01 | ValidBasic | mycases/valnorm.md |
| TN00 | ValidEmpty | mycases/valnull.md |