Background:
I grew up on using Perl/Python/Ruby for sysadmin-type tasks and shell scripting. I always avoided Bash scripting whenever I needed anything programmer-ish, like functions, looping or control structures. Back then, I could pick my favorite tool for whatever the job.
Problem:
Now I am working in a situation where the preferred method of doing sysadmin scripts is through Bash only. Since the people I work with have little or no desire to pick up Perl/Python/Ruby, I am forced to start using Bash, and using it for things that normally would be much more straightforward in a regular programming language (it seems).
For example, Perl/Python/Ruby all have pretty good support for XML and YAML, which makes it very very easy to implement config files that go along with a script. They also seem to have much better debugging support and understandable rules for syntax, whitespace etc.
Question:
It seems Bash scripting (when used as a shell-based programming language) has a lot of rules and caveats that one cannot just assume are like any of the "mainstream" programming languages. Stuff that one might expect to "just work" do not.
What are some of the pitfalls and gotchas that make Bash difficult to transition to if you are more accustomed to having the full programming language features of Perl/Python/Ruby? Is there any guide to make the differences more transparent and predictable?