This repository has been archived on 2021-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
plan9-scripts/z/bl

13 lines
382 B
Plaintext
Raw Permalink Normal View History

2021-07-11 14:45:20 +00:00
#!/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}
}