From: Paul Hänsch Date: Mon, 25 Jul 2022 12:34:06 +0000 (+0200) Subject: handle line breaks in $time and $work definitions X-Git-Url: https://git.plutz.net/?p=invoices;a=commitdiff_plain;h=c8a6c9bc6dd73d69073e64e2ed388654544ba697 handle line breaks in $time and $work definitions --- 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