![为什么'xargs bash -c'比'xargs sh -c'慢得多?](https://linux22.com/image/1163800/%E4%B8%BA%E4%BB%80%E4%B9%88'xargs%20bash%20-c'%E6%AF%94'xargs%20sh%20-c'%E6%85%A2%E5%BE%97%E5%A4%9A%EF%BC%9F.png)
time seq 100 | xargs -i bash -c 'echo {}'
;2.530秒
time seq 100 | xargs -i sh -c 'echo {}'
; 0.223秒
为什么?
PS:我这篇文章的标题更直观,更容易被谷歌或任何类型的搜索引擎发现或搜索到。
time seq 100 | xargs -i bash -c 'echo {}'
;2.530秒
time seq 100 | xargs -i sh -c 'echo {}'
; 0.223秒
为什么?
PS:我这篇文章的标题更直观,更容易被谷歌或任何类型的搜索引擎发现或搜索到。