Skip to content

Instantly share code, notes, and snippets.

@alexm
Created January 20, 2012 10:38
Show Gist options
  • Save alexm/1646641 to your computer and use it in GitHub Desktop.
Save alexm/1646641 to your computer and use it in GitHub Desktop.
Markdown as shell script
#!/bin/sh
# markdown as shell script
## setup
set -e
set -x
FOOBAR="foobar"
## step 1
echo "step 1"
[ -f $FOOBAR ] || touch $FOOBAR
date >> $FOOBAR
## step 2
echo "step 2"
cat >> $FOOBAR <<-EOF
# comment
Hello, world!
EOF
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment