From f7d609cc24d3e8147c821887aadf2c225b708c37 Mon Sep 17 00:00:00 2001 From: nihilazo Date: Sun, 11 Jul 2021 14:45:20 +0000 Subject: [PATCH] added z/bl script --- z/bl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 z/bl diff --git a/z/bl b/z/bl new file mode 100755 index 0000000..90ebaa3 --- /dev/null +++ b/z/bl @@ -0,0 +1,12 @@ +#!/bin/rc +# gets the backlinks to the current zettelkasten note in acme +# relies on the index generated by the script in my linux dotfiles. +# going to port that script to be a plan 9 program at some point. + +filename=`{cat /mnt/acme/$winid/tag | awk '{ print $1 }'} + +files=`{awk -v 'fn='`{basename $filename} '$2 ~ fn {print $1}' index} + +for (f in $files) { + echo $f: `{sed 1q $f} +}