Skip to content

Instantly share code, notes, and snippets.

@minhnhdo
Created November 28, 2012 17:02
Show Gist options
  • Save minhnhdo/4162544 to your computer and use it in GitHub Desktop.
Save minhnhdo/4162544 to your computer and use it in GitHub Desktop.
A helper script for keeping my journal
#! /bin/sh
FILENAME=`date +'%Y%m%d'`
if test ! -e $FILENAME; then
touch $FILENAME
fi
if test -s $FILENAME; then
cat >> $FILENAME <<HORIZONTAL
----------------
HORIZONTAL
fi
cat >> $FILENAME <<ENTRYTITLE
`date +'%H:%M:%S'`
========
ENTRYTITLE
# start composing
${EDITOR:-vi} $FILENAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment