It is this kind of thing that makes me want to avoid Bash every time. Something that should be trivial has no general consensus about how it should be done and, not only that, many pitfalls.
Bash is tiny, flexible, and highly effective at what it was designed to do: shell scripting, which is effectively user OS commandline automation.
It would be akin to me complaining that my microwave doesn't actually prepare a dinner for me, it just heats things up.
Regarding the multiple ways though, I think it's a matter of good judgment. Depending on the input, one may choose different tools - one should not forget that Bash is a glue language, intended to make tools work together.
Declarative languages, like SQL or (dare I say) Terraform, seem to be good teaching tools in that regard.
Oh, boy. Let me tell you about CSS.