Skip to content

Instantly share code, notes, and snippets.

@can3p
Created July 10, 2013 20:57
Show Gist options
  • Save can3p/5970272 to your computer and use it in GitHub Desktop.
Save can3p/5970272 to your computer and use it in GitHub Desktop.
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