Have you actually tested the portability? MacOS ships an ancient bash version and neither mac or BSDs use GNU version of coreutils.
I'm also very doubtful performance of this would be faster than python, bash is very slow.