Re:How fast are Linux pipes anyway?
by ur-whale on Thursday June 02, 2022 @08:48AM
(#31594134)
for the bash case, the cost of forking to write two chars is overwhelming compared to anything related to I/O.
[ Parent
| on HN ]
Echo and printf are shell built-ins in bash[0]. Does it have to fork to execute them?
You could probably answer this by replacing printf with /bin/echo and comparing the results. I'm not in front of a Linux box, or I'd try.
[0] https://www.gnu.org/software/bash/manual/html_node/Bash-Buil...
> Echo and printf are shell built-ins in bash
Ah, yeah, good point, I am wrong.