大家。我正在寻找一种方法来真正处理bash文件中无限数量的参数。我遇到的问题是xargs在14881行之后退出。我的文件是1.9gb,包含大约30m行。我应该有更好的方法吗?
我的代码示例:
cat /home/user/Desktop/file.log | xargs ethereum_private_key_to_address
这种方法效果很好,但是在35个不同实例上经过上述行数后退出。
有什么想法吗?
大家。我正在寻找一种方法来真正处理bash文件中无限数量的参数。我遇到的问题是xargs在14881行之后退出。我的文件是1.9gb,包含大约30m行。我应该有更好的方法吗?
我的代码示例:
cat /home/user/Desktop/file.log | xargs ethereum_private_key_to_address
这种方法效果很好,但是在35个不同实例上经过上述行数后退出。
有什么想法吗?
Your problem is
xargs
put the whole file content to the command line, which exceeds the operating system limit.xargs
has an option to limit the number of argumentstry this
cat /home/user/Desktop/file.log | xargs -n 500 ethereum_private_key_to_address
Why not pass input via
stdin