From 07c2cf90c2194a7e010db30553f016ca6c1bcd05 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Tue, 26 Nov 2019 02:25:37 +0100 Subject: [PATCH] replace non portable `line` command --- invoices.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invoices.sh b/invoices.sh index f8dbf85..a88bc7f 100755 --- a/invoices.sh +++ b/invoices.sh @@ -26,7 +26,7 @@ list_invoices(){ [ -d invoices/ ] || return 0 printf '[h1 Open]' - for i in invoices/*; do case "$(line <$i)" in + for i in invoices/*; do case "$(sed 1q <$i)" in *status=open*) list_invoice "$i";; *status=*) :;; *) list_invoice "$i";; @@ -34,7 +34,7 @@ list_invoices(){ for n in resent:Resent sent:Sent paid:Paid cancelled:Cancelled; do printf '[h1 %s]' "${n#*:}" - for i in invoices/*; do case "$(line <$i)" in + for i in invoices/*; do case "$(sed 1q <$i)" in *status=${n%:*}*) list_invoice "$i";; esac; done done -- 2.39.2