From a22fbf4e2582d4792dd386f1f679643914659cd0 Mon Sep 17 00:00:00 2001
From: la-ninpre
+today is a little meta-day. +i've added a little script to compose new log entries. +see how i said no automation and here i am, writing ed scripts. +oh, btw, i wrote this using ed(1). on workdays i can't use my home pc with a comfy acme. +as i once said, ed(1) is the best text editor for a phone. +no jokes. also it kinda forces you to think what you type and slow down a bit. +every line entered could not be edited with backspace. +once i wanted to write my own ed, but with more powerful regexes and with some features borrowed from sam(1), +like, for example, ability to forget that line terminators exist and treat text as a one-dimensional array of bytes. +but that's for another day maybe. +
+diff --git a/newlog.sh b/newlog.sh index 58cd1c2..8b24c64 100755 --- a/newlog.sh +++ b/newlog.sh @@ -4,8 +4,8 @@ _log_file="decadv-2025.html" -day="$(printf '%02d' "$1")" -[ -z "$1" ] && day="$(date +%d)" +day="$1" +[ -z "$1" ] && day="$(date +%d)" || day="$(printf '%02d' "$1")" echo "new log entry for day $day" -- cgit v1.2.3