Since you are an "advanced programmer," let me also
suggest to you that perhaps you should re-evaluate the question of whether it is worth your time to try to do this with "Bash scripting."
You have several
full-featured programming languages at your disposal... probably "Perl, PHP, Python, and Ruby ... (Scheme, anyone?)... " maybe more. It does not make the slightest bit of difference to Unix/Linux which one you choose.
(so-called "shebang") line at the top of any file will specify the programming-language that any particular command is written in. Bash will automatically invoke the appropriate programming-language environment. The end-user will neither know nor care.
The scripting facilities in Bash are intended
to be very rudimentary ... so that you don't have to
invoke another language (if you don't wish to...) just to do "simple things." But at the same time, they have no reason
to be anything more than that... because so gosh-darned many choices are available. You are free, then, to make a voluntary choice, entirely without penalty. And in this
case, one of the various true
programming-languages I just mentioned might be much
more to your liking.
It all comes down to... "what is, for you,
tool for the job." In your case, given your self-professed experience, I doubt that "Bash is 'it.'" I come from a more-or-less similar background, and it certainly is not for me...
I frankly know very little about "Bash scripting" because I have had little reason to do much with it. Other "better for me"
alternatives are so-readily available... The beauty of Unix/Linux is that "you actually have real choices."
The amount of work-time that it would realistically take "an experienced programmer" to whack-out a suitable solution using any
of the aforementioned languages would be negligible. I picked-up Python in an afternoon (good enough to get the job done...), PHP in a fortnight, Perl in less than three days. Ruby... well...
(Naah, seriously, I just haven't gotten around to
"that one, yet.")