Skip to content

Instantly share code, notes, and snippets.

@can3p
Created Jul 10, 2013
Embed
What would you like to do?
Diary function in bash
log() {
LOG_PATH=~/Dropbox/diary/
FNAME=`date "+%Y-%m-%d"`.md
HEADER="
*************************************
Time: `date \"+%H:%M:%S\"`
Subject:
Mood:
Music:
*************************************
"
mkdir -p $LOG_PATH
echo "$HEADER" >> $LOG_PATH/$FNAME
vim + $LOG_PATH/$FNAME
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment