I have a changelog file in markdown which contains all changes between each version of my app like that :
## Version 1.0.6
* first change
* second change
* third change
## Version 1.0.5
* first foo change
* second foo change
## Version 1.0.4
* and so on...
What I want is to extract in a script the changes content for a version. For example I would to extract the changes for the version 1.0.5, so it should print :
* first foo change
* second foo change
The ideal way would be ./getVersionChanges version filename
which would those 2 params :
version
: the version to extract changes
filename
: the filename to parse
How can I achieve this with sed, awk, grep, or whatever ?