X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Fview_prescription.sh;h=78f995b97d425aa22ebe9c5df4354368addc4fd2;hp=ce2b4967b7bf2e7ca4bbb37f22662733220a5a21;hb=9b13f7013dd882029ab3cf106d659a48243d910d;hpb=fa569abc3f855692322f791a0c1112f85126e990 diff --git a/templates/view_prescription.sh b/templates/view_prescription.sh index ce2b496..78f995b 100755 --- a/templates/view_prescription.sh +++ b/templates/view_prescription.sh @@ -69,21 +69,20 @@ cat <
- - - - -${mpx[quantity]} -${mpx[remidy]} -${mpx[quantity_weekly]} - - - - -${mpx[quantity1]} -${mpx[remidy1]} -${mpx[quantity_weekly1]} - + + + + ${mpx[quantity]} + ${mpx[remidy]} + ${mpx[quantity_weekly]} +$( for n in {0..10}; do + [ -n "${mpx[quantity$n]}" -o -n "${mpx[remidy$n]}" -o -n "${mpx[quantity_weekly$n]}" ] \ + && printf ' + %s + %s + %s + ' "${mpx[quantity$n]}" "${mpx[remidy$n]}" "${mpx[quantity_weekly$n]}" +done )