bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

xargs -p operations out of order!


From: jidanni
Subject: xargs -p operations out of order!
Date: Thu, 01 Aug 2013 01:01:15 +0800

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

[Prev in Thread] Current Thread [Next in Thread]