I'm at work at the moment, so I can't test this on my OpenBSD machine at home. However, have you tried setting IFS to a new line prior to feeding newline separated output to xargs?
IFS=" " some_command_that_generates_multiple_lines | xargs -n 1 some_other_command Understand that "xargs -0" from linux-land doesn't delimit on new lines. It delimits on a zero marker "null" separator often generated by linux-land find. On Fri, Oct 13, 2017 at 1:49 PM, Raul Miller <rauldmil...@gmail.com> wrote: > The problem here is that you currently can't get xargs to use newline > as a separator without also getting spaces as a separator. This > creates a variety of problems. > > Thanks, > > -- > Raul > > > On Fri, Oct 13, 2017 at 2:40 PM, Allan Streib <astr...@indiana.edu> wrote: > > Raul Miller <rauldmil...@gmail.com> writes: > > > >> Can someone explain to me why xargs(1) does not support using newline > >> as a separators, when that is one of the most common unix separators? > > > > Which xargs(1) are you talking about? From my 6.1 machine, man xargs > > says: > > > > The xargs utility reads space, tab, newline, and end-of-file > > delimited strings from the standard input and executes the > > specified utility with the strings as arguments. > > > > Allan > > > >