"FreeBSD and OpenBSD don't ship GNU's bash in their base, and I like to write scripts that "just work"TM. Using only POSIX-ish shell is usually how I achieve this goal but this time it wasn't possible:"<p>"The output file was around 2 million lines, and OpenBSD's sh(1) obviously had serious issues looping over that many lines (while IFS= read -r _first _second _rest; do ...; done < input). Linux' bash didn't (it completed the run in less than 3 minutes)."<p>GNU/Linux generally does not use bash as a scripting shell.^1
Bash is provided as an interactive shell.<p>Most distributions use dash as the scripting shell, which is a slightly modified version of NetBSD's sh, which is a modified version of the Almquist shell.<p>This is available on OpenBSD, e.g.,<p><a href="https://ftp.fr.openbsd.org/pub/OpenBSD/7.2/packages/amd64/dash-0.5.11.5-static.tgz" rel="nofollow">https://ftp.fr.openbsd.org/pub/OpenBSD/7.2/packages/amd64/da...</a><p>1. Because dash is significantly faster than bash for scripting