我正在使用parallel --keep-order --line-buffer --halt 2
在一堆命令上并行调用GNU。每隔一段时间,其中一个命令就会失败,GNU 并行打印:
parallel: This job failed:
<failing command comes here>
有没有办法在发生这种情况时仅打印失败作业的 stdout 和 stderr?
neno
(no-error-no-output(就是这样做的:
neno 'echo stdout; echo stderr >&2; false'
neno 'echo stdout; echo stderr >&2; true'
https://gitlab.com/ole.tange/tangetools/-/tree/master/neno
所以:
parallel --halt 2 neno ...