Joined November 2012
·

Chris Bojarski

Director of IT at Innovative Concepts
·
Philadelphia, PA
·
·
·

Posted to mdcat: Markdown to text over 1 year ago

If you're willing to have a few lines more, you can do a conditional based on the arg count:

function mdcat() {
    if [ $# = 0 ]; then
        markdown | html2text
    else
        markdown < $* | html2text
    fi
}

Then it will work with piped input.

Achievements
91 Karma
0 Total ProTip Views