gawk '/^#[[:space:]]+/' allbook_modified.md
The above code will print out all section names of a markdown file.