Skip to content

Instantly share code, notes, and snippets.

@abriening
Created August 2, 2012 15:39
Show Gist options
  • Save abriening/3238015 to your computer and use it in GitHub Desktop.
Save abriening/3238015 to your computer and use it in GitHub Desktop.
#!/bin/sh
# create a txt file to write today's notes
DIRNAME="${HOME}/Documents/stuff_i_did/`date +%Y`/`date +%m`/"
FILENAME="${DIRNAME}`date +%Y-%m-%d`.txt"
mkdir -p $DIRNAME
if [ ! -f $FILENAME ]; then
echo "---
# `whoami` did stuff today
- `date +%Y-%m-%d`
- " >> `echo $FILENAME`
fi
# open with textEdit
open -e $FILENAME
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment