commit 300fb982f3b25b51c19a99f5f208425d9913f79a
parent 998b50d2bb297aac3ac5cfa81555a6335deea0ea
Author: Alex Balgavy <alex@balgavy.eu>
Date: Thu, 7 Jan 2021 18:25:28 +0100
pocketbook-notes: delete empty lines
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/pocketbook-notes b/scripts/pocketbook-notes
@@ -10,6 +10,7 @@ books_db="$1"
title_wild="$2"
# to grep a whole DB, do: `sqlite3 <filename> .dump | grep -i 'whatever'`
+# TODO: maybe do some explicit ordering?
sqlite3 "$books_db" \
"select Tags.Val
from items join tags on (Items.OID = Tags.ItemID)
@@ -18,4 +19,4 @@ sqlite3 "$books_db" \
and TagId = (select OID from TagNames where TagName = 'bm.quotation');" \
| sed '$!s/$/,/; 1s/^/[/; $s/$/]/' \
| jq -r '.[].text' \
- | sed 's/^/* /'-
\ No newline at end of file
+ | sed '/^$/d; s/^/* /'+
\ No newline at end of file