xargs: losing output when redirecting stdout to a file in parallel mode

后端 未结 2 1511
春和景丽
春和景丽 2021-01-03 03:01

I am using GNU xargs (version 4.2.2) in parallel mode and I seem to be reliably losing output when redirecting to a file. When redirecting to a pipe, it appears to work corr

2条回答
  •  执念已碎
    2021-01-03 03:07

    I know this question is about xargs, but if you keep on having issues with it, then perhaps GNU Parallel may be of help. Your xargs invocation would translate to:

    $ < /tmp/nums parallel -j20 -N100 echo > /tmp/out; wc /tmp/out
    26  2550 11643 /tmp/out
    

提交回复
热议问题