Skip to content

Instantly share code, notes, and snippets.

@kentbye
Created August 6, 2014 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kentbye/6b81372dedccbc8a7a5b to your computer and use it in GitHub Desktop.
Save kentbye/6b81372dedccbc8a7a5b to your computer and use it in GitHub Desktop.
Convert Markdown file to HTML and copy into copy buffer from the command line
#!/bin/bash
FULLFILE=$1;
FILE="${FULLFILE%%.*}";
# Convert markdown to html
echo "converting $FILE.md to $FILE.html";
`pandoc -i $FILE.md -o $FILE.html`;
echo "copying HTML into copy buffer";
`cat $FILE.html | pbcopy`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment