added z/bl script

This commit is contained in:
Nico 2021-07-11 14:45:20 +00:00
parent 84dc332c3b
commit f7d609cc24
1 changed files with 12 additions and 0 deletions

12
z/bl Executable file
View File

@ -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}
}