You can use the Mozilla project's Rhino parser to write shell scripts in JavaScript / ECMA script on OS X. This tutorial walks you through the process.
Comments (1)
Mac OS X Hints http://hints.macworld.com/article.php?story=20031212114801974