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