From a21179a0264d1573116f7c752207f05e23dd3342 Mon Sep 17 00:00:00 2001 From: Rob Muhlestein Date: Tue, 12 Sep 2023 13:48:40 -0400 Subject: [PATCH] add lh for extracting headings as bullets --- scripts/lh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 scripts/lh diff --git a/scripts/lh b/scripts/lh new file mode 100755 index 0000000..43ca15b --- /dev/null +++ b/scripts/lh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +while read -r line;do + [[ $line =~ ^##\ [^\ ] ]] && echo "* ${line#*# }" +done < "$1" + +exit 0