Some things that make shell scripts have performance issues
&quot;Instead, what causes shell scripts problems is the cost of starting separate programs. Sed may transform text very fast and sort may sort data very fast, but starting sed or sort is comparatively expensive.&quot;<p>Obviously using shell builtins as much as possible is one way to mitigate this slowdown.  Another is to create a multicall binary.<p>NetBSD (and its fork OpenBSD) have crunchgen allowing easy creation of custom multicall, static binaries.  Linux has something similar called busybox.<p>A single binary contains all the utilities I need for text processing, e.g., sed and sort are the same program.  I create hard links for all the different program names, but all programs are contained in the same binary.<p>One program &quot;swallows&quot; all the work, to use the author&#x27;s terminology.