touch "$meta" # preliminary touch to prevent concurrent generators
find "$dir" -type f -mindepth 1 -maxdepth 1 \
| grep -E "$file_pattern" \
- | while v="$(line)"; do
+ | while read -r v; do
meta_line "$v"
done >"$meta"
touch "$meta"
find "$dir" -type f -mindepth 1 -maxdepth 1 \
| grep -E "$file_pattern" \
- | while v="$(line)"; do
+ | while read -r v; do
if [ "$v" -nt "$meta" ]; then
grep -qF " $(meta_name "$v")" "$meta" \
|| meta_line "$v"
local meta
(cd "$_DATA/$ITEM";
find ./ -path '*/.index/meta'
- ) | while meta="$(line)"; do
+ ) | while read -r meta; do
list_filemeta "${meta%/.index/meta}"
done
}