I'll also add that this is the real value behind learning at least one language REALLY well. For me it's Python, for this guy it's Ruby. That means the language, it's ecosystem of platforms, and the standard lib.
Might be important to mention in these days where a new significant language seems to break onto the scene every 8 months or so.
I submit that any working programmer ought to know (or be about the business of knowing) at least one language well enough that they can go from idea to working prototype without spending a ton of time reading documentation and wondering about the canonical way to do something. One language where you can automate stuff and solve small problems.
For me it's shell scripts. Yeah they aren't ultimately as flexible as something like python, but piping together grep, sed, awk, and other command-line utilities, and some simple control-flow capabilities (if/then, loops, case statements) you can do a lot quickly.
And you can always write a little piece in Python, if any of the standard utilities are quite what you need.
What about Ruby and Perl and their ability to shell out as easily as you do in a shell? (with backticks)
You have a real language available with (arguably) fewer weird things and warts to be aware of or remember, better string manipulations and lots of other advantages, but if you really just want to send something through `awk` or `bc` you can do that just as easily as you do in bash and capture the result in a Ruby or Perl variable.
Seems like a win-win situation. (Unless you have an exceptional circumstance with requirements about running anything but shell scripts or something like that.)
I write quite a few Ruby utilities (for myself) and this is what I do: use backticks to harness the power of shell utilities, but have Ruby glue to do more complex tasks with those tools.
For example, I recently wrote a quick Ruby script to test various parts of my internet connection (ping default gateway, test DNS resolution, etc) because I was bored and my internet connection was down. I used backticks to do things like grab a nameserver from /etc/resolv.conf and then ping the server, but I had the surrounding Ruby code doing things like parsing the output using regular expressions and doing some logic on the results.
Sure, I could have written the thing in pure bash, but Ruby has better text manipulation capabilities when it comes to things like parsing (in my opinion), and with the backticks, I still was able to harness the power of the shell anyways.
I'm not sure how portable such solutions are, but for a home-grown testing program written on a whim out of boredom, it was certainly enjoyable to have both the power of Ruby and the shell available.
I agree that shell scripts are great. Add in something like Groovy or Scala to get access the multitude of java libraries out there and it's easy to do a lot of work very quickly.
Might be important to mention in these days where a new significant language seems to break onto the scene every 8 months or so.
I submit that any working programmer ought to know (or be about the business of knowing) at least one language well enough that they can go from idea to working prototype without spending a ton of time reading documentation and wondering about the canonical way to do something. One language where you can automate stuff and solve small problems.