Last active
August 29, 2015 14:19
-
-
Save maxrp/0486ace9974619cc49ff to your computer and use it in GitHub Desktop.
A simple logbook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Usage: . new-case 'Investigating whacky happenstance.' | |
date=`date +%Y-%m-%d` | |
if [ -d $date ]; then | |
echo "Case ${date} exists." | |
cd $date | |
else | |
echo "Starting record for ${date}." | |
mkdir -p $date/{raw,processed} | |
echo $1 | |
if [ ! -z $1 ]; then | |
echo "## Summary: ${@}" >> $date/notes.txt | |
else | |
touch $date/notes.txt | |
fi; | |
export PS1="<$date> ${PS1} " | |
cd $date | |
fi; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment