← Back to context

Comment by zikduruqe

1 day ago

Hell, you don't even need obsidian. Just create a bash function

    notes()
    {
    if [ ! -z "$1" ]; then
        mkdir -m 00750 -p /Users/User/iCloud/Documents/notes
        Now=$(date '+%B %d %Y %H:%M')
        echo -en "\n$Now\t$@\n" >> /Users/User/iCloud/Documents/notes/notes.txt
    else
        echo "${Now}"
        cat /Users/User/iCloud/Documents/notes/notes.txt 2>/dev/null
        fi
    }

While we're sharing simple note taking functions, here's mine that I used for a few years. :)

    function nod { mg +-1 "/home/user/notes/$(date "+%Y-%m-%d").txt"; }

* 'nod' stands for "notes of (the) day" and was quick to type.

* 'mg' is micro emacs, my first shell-based editor thanks to OpenBSD. The '+-1' syntax means "open at end of file" so I could easily append.