Browse Source

Use multi-line info message support within jat_dump.sh

Alois Mahdal 6 years ago
parent
commit
b53689575e
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      src/jat_dump.sh.skel

+ 5
- 4
src/jat_dump.sh.skel View File

309
     local oorig=$4              # original file in case of HEXDUMP
309
     local oorig=$4              # original file in case of HEXDUMP
310
     local bloat=""              # human description of limit excess; empty
310
     local bloat=""              # human description of limit excess; empty
311
                                 # .. means OK to dump to log; else use jat__submit()
311
                                 # .. means OK to dump to log; else use jat__submit()
312
-    local lline=""              # logged line
312
+    local llines=()             # logged lines
313
 
313
 
314
     oname="$(tr / - <<<"$oname")"
314
     oname="$(tr / - <<<"$oname")"
315
     bloat="$(__jat_dump__count "$opath")"
315
     bloat="$(__jat_dump__count "$opath")"
337
              && echo "=====NO_NEWLINE_AT_EOF====="
337
              && echo "=====NO_NEWLINE_AT_EOF====="
338
             echo  "=====END $otype $oname====="
338
             echo  "=====END $otype $oname====="
339
         } \
339
         } \
340
-          | while IFS= read -r lline; do
341
-                $dmpfun "$lline"
342
-            done
340
+          | {
341
+                readarray -t llines
342
+                $dmpfun "${llines[@]}"
343
+            }
343
     else
344
     else
344
         case $otype in
345
         case $otype in
345
             FILE)
346
             FILE)