#!/usr/bin/env bash # Parse a Markdown file into HTML and return the generated file declare md2html_bin make_html() { out=${1%.md}.html while [[ -f $out ]]; do out=${out%.html}.$RANDOM.html done eval "$md2html_bin" "$1" >"$out" echo "$out" }