Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .
- ├── html
- └── md
- #! /bin/bash
- # run this from a folder containing markdown files
- # it delivers html to the sibling html folder
- if hash pandoc 2>/dev/null; then
- for file in ./*.md ; do
- echo Converting $file
- cat "$file" | pandoc -o "$(echo $file | sed 's/^./../html/' | sed 's/.md$/.html/')"
- done
- else
- echo "I need pandoc installed"
- fi
Add Comment
Please, Sign In to add comment