@aurynn I never finished (though this is probably the right thing to do). There was one sneaky `tr` in there that I never got around to removing:
It's all sorts of bad.
Seriously though I like well-written Bash and the purity of not needing to call separate programs (even though I admit it's hard to protect against weird edge cases, e.g. whitespace stuff. doubly-so if you want your code to be readable), and it would be such a shame to not be able to remove that one measly external call!
And it gave me a brief fun exercise to work out how whether Bash pattern substitution appropriately supported character classes. :)
A paid, early access, strongly moderated Mastodon instance hosted entirely in New Zealand.