3 ms·
Here's mine. It uses an editor. Tags are done via :tag . Search is supported using the same editor or grep. It automatically adds a date. If I start typing on a
by notyourday 6y ago
Here's mine. It uses an editor. Tags are done via :tag . Search is supported using the same editor or grep. It automatically adds a date. If I start typing on a command line then whatever I typed becomes the starting line of a note. It is aliased to "notes".
#!/bin/bash
PAST_ALL_LINES="10000000" # skipping this many lines puts us to the bottom of the file
EDITOR=/usr/bin/joe
LOGBOOK=~/.securedocs/notes.txt
if [[ ! -f ${LOGBOOK} ]]; then
echo "${LOGBOOK} is not found. Check if it exists
first?"
exit 1
fi
if [[ ! -f ${EDITOR} ]]; then
echo "${EDITOR} is not found. Install it first?"
exit 1
fi
STRING=''
if [[ ! -z "$@" ]]; then
STRING="$@ "
fi
echo -e -n "\n`date`\n===============================\n\n$STRING"|${EDITOR} +100000000 ${LOGBOOK}