Last active
April 28, 2016 14:25
-
-
Save ywindish/4950838 to your computer and use it in GitHub Desktop.
perl one-liner: Markdown text to HTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# one-liner | |
# Markdown document to HTML from Text::Markdown | |
# | |
# perl -MText::Markdown=markdown -e "$txt='';while(<>){$txt.=$_};print markdown($txt);" < test.txt | |
# |
I had to switch quotes to avoid bash variable expansion:
'$txt="";while(<>){$txt.=$_};print markdown($txt);'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
もっとうまいやり方があるはず