Pipelines using Fibers in Ruby (1.9)
http://pragdave.me/blog/2007/12/30/pipelines-using-fibers-in...
http://pragdave.me/blog/2008/01/01/pipelines-using-fibers-in...
I swear it was actually a 3-part series, but only 2 parts I can find right at the moment.
It becomes more of a "what should this program should consume, do and output and feedback" problem... Bash, Ruby, whatever... but aim for some standards, in general.
Furthermore, with Ruby, as a dynamic language with full network capabilities and add-on packages (gems) with other IPC libraries (zmq), there are other structured, efficient serialized service consumer/producer configurations possible rather than only shell commands. There are also background job processing frameworks like sidekiq and parallel job processors like celluloid, parallel and EventMachine.
The future, really (for dev &| ops tasks) in on-demand loaded, micro-services rather than giant, slow frameworks. The glue (say chef code) and one-ofs will likely still be a bunch of Ruby code and hopefully more Ruby code, respectively, too.
Taking this contrived example at face value, imho, I'd instead place the "best of bash" for the particular task with file globbing.