Custom bash script for converting old markdown?

Has anyone written a bash script to convert the old markdown? Maybe using regex?

I’ve tried a few times to use the convert functionality in the app but every time it just removes the old # without adding the new -.

Appreciate your time