]> us-delaporte.pagekite.me Git - minion.git/commitdiff
Add at command to search by context
authorEdward Delaporte <edward@delaporte.us>
Sun, 30 Aug 2026 03:18:46 +0000 (22:18 -0500)
committerEdward Delaporte <edward@delaporte.us>
Sun, 30 Aug 2026 03:18:46 +0000 (22:18 -0500)
bin/at [new file with mode: 0755]

diff --git a/bin/at b/bin/at
new file mode 100755 (executable)
index 0000000..393d3f7
--- /dev/null
+++ b/bin/at
@@ -0,0 +1,13 @@
+#!/bin/bash
+# at foo - searches ~/Journal/YYYY/MM-daily.md for @foo
+# One file per month
+
+year=`date +%Y`
+topic='daily'
+mkdir -p "$HOME/Journal/$year"
+month=`date +%m`
+fname="$HOME/Journal/$year/$month-$topic.md"
+
+search="@$1"
+
+cat $fname | grep $search