Earlier quoted context omitted.
Generally if you're trying to do something that feels like a "program" in shell script, rather than loosely gluing existing tools together, the threshold for moving it into Perl or Python should be low. Even things like trying to get the quoting right for lists of files some of which may have spaces in their names is fiddly enough to drive people to writing a "proper" program. (or was this comment intended for https:…
The moment I have to use arrays in bash, I open up a python interpreter. Syntax makes far more sense than in bash.
For a maintainable script pythons great of course.