Guest User

Untitled

a guest
Nov 17th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. .
  2. ├── html
  3. └── md
  4.  
  5. #! /bin/bash
  6. # run this from a folder containing markdown files
  7. # it delivers html to the sibling html folder
  8. if hash pandoc 2>/dev/null; then
  9. for file in ./*.md ; do
  10. echo Converting $file
  11. cat "$file" | pandoc -o "$(echo $file | sed 's/^./../html/' | sed 's/.md$/.html/')"
  12. done
  13. else
  14. echo "I need pandoc installed"
  15. fi
Add Comment
Please, Sign In to add comment