Skip to content

Instantly share code, notes, and snippets.

@toddwprice
Created September 15, 2016 13:56
Show Gist options
  • Save toddwprice/a012d5e40c826e0520c6931c4df0b2d7 to your computer and use it in GitHub Desktop.
Save toddwprice/a012d5e40c826e0520c6931c4df0b2d7 to your computer and use it in GitHub Desktop.

Revisions

  1. toddwprice created this gist Sep 15, 2016.
    12 changes: 12 additions & 0 deletions journal.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    #!/bin/bash
    _now=$(date +"%Y-%m-%d-%a")
    _title=$(date +"%Y-%m-%d %a")
    _file="/Volumes/Secomba/todd/Boxcryptor/Dropbox/Home/Docs/Todd/Journal/$_now.md"
    if [ -f $_file ];
    then
    echo "File $FILE exists. Opening..."
    else
    echo "Creating new journal to $_file..."
    echo "## $_title" > "$_file"
    fi
    open "$_file"