Shell Helper Create New Post

I created a little shell helper to create a new markdown file for a blogpost.


touch _posts/`date +%Y-%m-%d`-$

With this scipt i can do

thomas@thinky ~/dev/pages (git)-[master] % ./ Shell-helper-create-new-post

EDIT: I extended the snippet a little bit:

FILENAME="_posts/`date +%Y-%m-%d`-$"
echo "---
layout: default

Now the default layout is added to the file and the fileeditor $EDITOR is launched.