From c8a6c9bc6dd73d69073e64e2ed388654544ba697 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Mon, 25 Jul 2022 14:34:06 +0200 Subject: [PATCH] handle line breaks in $time and $work definitions --- odtgen.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odtgen.sh b/odtgen.sh index 1dfa5e8..abed2db 100755 --- a/odtgen.sh +++ b/odtgen.sh @@ -178,8 +178,8 @@ odt_content(){ $(sed 1d "invoices/$id" |while read -r time work hours; do - time="$(UNSTRING "${time#time=}" |sed 's;\r;;g')" - work="$(UNSTRING "${work#work=}" |sed 's;\r;;g')" + time="$(UNSTRING "${time#time=}" |sed -r 's;( \;)? \;|(�?[Dd]\;)?�?[aA]\;|\r?$;;g')" + work="$(UNSTRING "${work#work=}" |sed -r 's;( \;)? \;|(�?[Dd]\;)?�?[aA]\;|\r?$;;g')" hours="$(UNSTRING "${hours#hours=}")" cat <<-TROW -- 2.39.2