by moviuro on 1/6/23, 10:55 AM with 1 comments
by 1vuio0pswjnm7 on 1/6/23, 12:00 PM
"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)."
GNU/Linux generally does not use bash as a scripting shell.^1 Bash is provided as an interactive shell.
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.
This is available on OpenBSD, e.g.,
https://ftp.fr.openbsd.org/pub/OpenBSD/7.2/packages/amd64/da...
1. Because dash is significantly faster than bash for scripting