Help with modifying a KM script please?
Hi, at some point I've taken a KM script from here (don't know who posted it, apologies) that inserts a link to existing notes.
It's coming up with two suggestions for each note - I suspect it's becuase in the folder there's a plist file for every .md note, because I used another app to access the folder and that's what it generates. Annoyingly.
The script is this - can this be modified to only show the one expected entry?
ls | sed -E -e 's/.[^.]*$//' -e 's!^([0-9]+)[[:space:]-]+(.+)!\2 [[\1]]!'
If not, it's no big deal, I've only accessed this folder with the other app to prepare for my exams and it's not part of my long term ZK approach, so I'll just start afresh once I'm through - but it would be really good. Thanks in advance.
It looks like you're new here. If you want to get involved, click one of these buttons!
Do you mean like this?
This is a result of the plist shenanigans. This should work.
ls | sed -E -e 's/\..*$//' -e 's!^([0-9]+)[[:space:]-]+(.+)!\2 [[\1]]!' | sort -u
My peak cognition is behind me. One day I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
That's fantastic, thank you. I'll try that tomorrow.