Rexe - ruby script for shell scripting

Rexe is a Ruby script and gem that multiplies Ruby’s usefulness and conciseness on the command line.

Ruby Command Line Executor/Filter.
Executes Ruby code on the command line, optionally automating management of standard input and standard output, and optionally parsing input and formatting output with YAML