sbs

A Simple Blogging System.
git clone https://git.sr.ht/~jbauer/sbs
Log | Files | Refs | README | LICENSE

commit d542b18646442182ec2fb0557a5637620756fdae
parent e74f8b9164e0903f60729c720933dd952a648313
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Fri, 17 Mar 2023 19:50:43 -0400

Use awk to print number of feed entries generated

This fixes an issue where the number was not being displayed on OpenBSD
because the output of `wc -l` was being pre-pended with spaces.

Diffstat:
Msbs | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbs b/sbs @@ -163,7 +163,7 @@ genfeed() } >> static/feed.xml done - numEntries="$(wc -l "$tmp" | cut -d' ' -f1)" + numEntries="$(wc -l "$tmp" | awk '{print $1}')" printf '</feed>\n' >> static/feed.xml if [ "$verbosity" -gt 0 ]; then printf "Created: static/feed.xml with %s entries.\n" "$numEntries"