Bash strikes me as a bit of a mess, as in people threw the kitchen sink into it for 'portability'.
Things like being able to open a socket e.g. using the /dev/tcp/<ip>/<port> stuff give me the willies a bit.
I lean towards Ruby if it's going to be anything longer than a few lines, or requires anything but the simplest of logic/commands. Otherwise I was always told /bin/sh is likely to be the most portable, so tend to use that in the absence of any other good reason.
I've written two network/telnet game-bots in Bash. It's terribly hacky but fun in it's own way. Using the dev tcp trick and arrays and lots of bashisms.
Things like being able to open a socket e.g. using the /dev/tcp/<ip>/<port> stuff give me the willies a bit.
I lean towards Ruby if it's going to be anything longer than a few lines, or requires anything but the simplest of logic/commands. Otherwise I was always told /bin/sh is likely to be the most portable, so tend to use that in the absence of any other good reason.