Skip to content

Instantly share code, notes, and snippets.

@pydevops
Created October 13, 2018 19:48
Show Gist options
  • Save pydevops/98d5954765828291f7a35d3ec2b74eb7 to your computer and use it in GitHub Desktop.
Save pydevops/98d5954765828291f7a35d3ec2b74eb7 to your computer and use it in GitHub Desktop.
markdown to html
#!/bin/bash
SRC_DIR=$HOME/Desktop
DEST_DIR=$HOME/man
mkdir -p $DEST_DIR
for mdfile in ${SRC_DIR}/*.md
do
filename=${mdfile##*/}
basename=${filename%.md}
pandoc -o ${DEST_DIR}/${basename}.html ${mdfile}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment