> > Here's what I'd do: just use tr to swap the delimiters. > > while read -d '' -r group; do > mapfile -t files <<< "$group" > ... > done < <(tr '\n\0' '\0\n' < "yourfile") > > > I want to pipe each group to xargs -0. > > Not what I'd do. >
Thanks! But is there something wrong with xargs? or is it my use of "echo ...|xargs" (I did not know "here strings") Do you mean, in your example, that e.g. ... do mapfile -t files <<< "$group" ; ls -1 "${files[@]}"; done ... is better than: ... do xargs -d '\n' ls -1 <<<"$group"; done ...