What good is this?

$ seq 111|xargs -n 5 -p
echo 1 2 3 4 5 ?...
echo 6 7 8 9 10 ?...
echo 11 12 13 14 15 ?...y
echo 16 17 18 19 20 ?...11 12 13 14 15

You need to do the operation first before issuing the next prompt!
It should look like

$ seq 111|xargs -n 5 -p
echo 1 2 3 4 5 ?...
echo 6 7 8 9 10 ?...
echo 11 12 13 14 15 ?...y
11 12 13 14 15
echo 16 17 18 19 20 ?...

Yes,
$ seq 111|xargs -n 5 -p > file
works fine, but
$ seq 111|xargs -n 5 -p 1>&2
and
$ seq 111|xargs -n 5 -p 2>&1
show that you are doing things out of order!

$ xargs --version
xargs (GNU findutils) 4.5.11

Reply via email to