浏览代码

Use multi-line info message support within jat_dump.sh

Alois Mahdal 6 年前
父节点
当前提交
b53689575e
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5
    4
      src/jat_dump.sh.skel

+ 5
- 4
src/jat_dump.sh.skel 查看文件

@@ -309,7 +309,7 @@ __jat_dump__logobj() {
309 309
     local oorig=$4              # original file in case of HEXDUMP
310 310
     local bloat=""              # human description of limit excess; empty
311 311
                                 # .. means OK to dump to log; else use jat__submit()
312
-    local lline=""              # logged line
312
+    local llines=()             # logged lines
313 313
 
314 314
     oname="$(tr / - <<<"$oname")"
315 315
     bloat="$(__jat_dump__count "$opath")"
@@ -337,9 +337,10 @@ __jat_dump__logobj() {
337 337
              && echo "=====NO_NEWLINE_AT_EOF====="
338 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 344
     else
344 345
         case $otype in
345 346
             FILE)