pfx="$(STRING "${pfx#/}")"
[ "$pfx" = '\' ] && pfx='' || pfx="${pfx}/"
- dbmeta_autogroup "$meta" \
- | while read -r LENGTH WIDTH HEIGHT TAGS COMMENT NAME GROUP; do
- printf '%i %i %i %s %s %s%s %s\n' \
- $LENGTH $WIDTH $HEIGHT "${TAGS}" "${COMMENT}" \
- "${pfx}" "${NAME}" "${GROUP}"
- done
+ { printf '%s\n' "$pfx"
+ dbmeta_autogroup "$meta"
+ } | sed -E '
+ 1{ h; b; }
+ G;
+ s;^([^\t]+ [^\t]+ [^\t]+ [^\t]+ [^\t]+ )([^\n]+)\n(.*)$;\1\3\2;
+ '
done
}