WEBTOOLIST.
STATIC WEB PLATFORM
NO ACCOUNTS / NOTHING TO INSTALL

$ webtoolist --script timestamped-notes

Timestamped Notes

Append a timestamped note to a daily Markdown file without leaving the shell.

category Shell Productivity shell Bash 4+ updated 2026-08-27
notesmarkdownjournalproductivity
Safety notes
  • Appends to a file in your notes directory; it never overwrites existing content.

Dependencies: date

Usage

  • Set NOTES_DIR (default: ~/notes).
  • Pass the note as arguments; quoting is preserved as words.

Script

#!/usr/bin/env bash
set -euo pipefail

notes_dir="${NOTES_DIR:-$HOME/notes}"
mkdir -p "$notes_dir"
file="$notes_dir/$(date +%F).md"

(($# > 0)) || { echo "usage: $0 NOTE TEXT" >&2; exit 1; }

if [[ ! -f "$file" ]]; then
  printf '# %s\n\n' "$(date +%F)" > "$file"
fi

printf -- '- %s — %s\n' "$(date +%H:%M)" "$*" >> "$file"
echo "noted in $file"

Example

./timestamped-notes Reviewed the migration plan
NOTES_DIR=~/work/notes ./timestamped-notes Follow up with Alice

Notes

  • The date command uses the local timezone; set TZ if your notes should follow another zone.
  • This is deliberately append-only. Use an editor for restructuring.

Related scripts

Fuzzy Find Helper

Search filenames interactively with fzf when available, falling back to find.

Shell Productivity