logoalt Hacker News

gaigalastoday at 7:07 AM1 replyview on HN

One main reason is performance. Forking for other tools is very expensive.

That said, using larger sed or awk programs instead of ad-hoc calls for small snippets would perhaps be net-positive for performance and readability.

I'm currently working on very strict bootstrap scenarios in which sed and awk might not be available, but a shell might be (if I'm able to write it). It is possible that in such scenarios, the fist send and awk versions will be shell-written polyfills anyway.


Replies

MisterTeatoday at 11:49 AM

> One main reason is performance

This assumes the executed program is as fast or slower than the caller.