Question 1
In a markdown file, the level of heading is decided by the number of # at the beginning of the line. For example, # at the beginning of the line indicates a level 1 heading, ## indicates a level 2 heading and so on. There is a space between # and heading text. The sample input shown below conveys the simplicity of the test cases.
Write a SED script 'script.sed'
- To reduce the level of heading by 1, for example
#to##and##to### - Add "# Text editors in Linux" as the first line
Sample Input
# Line Editors
## Ed
---
# Modal Editors
## Vi
## Vim
## Neovim
---
# Non-modal Editors
## Nano
## Emacs
Sample Output
# Text editors in Linux
## Line Editors
### Ed
---
## Modal Editors
### Vi
### Vim
### Neovim
---
## Non-modal Editors
### Nano
### Emacs