spec/lib/jspec.growl.js
function(cmd) {
      var lines = [], line
      with (JavaImporter(java.lang, java.io)) {
        var proccess = Runtime.getRuntime().exec(Array.prototype.slice.call(arguments))
        var stream = new DataInputStream(proccess.getInputStream())
        while (line = stream.readLine())
          lines.push(line + '')
        stream.close()    
      }
      return lines
    }
function(cmd) {
      var lines = [], line
      with (JavaImporter(java.lang, java.io)) {
        var proccess = Runtime.getRuntime().exec(Array.prototype.slice.call(arguments))
        var stream = new DataInputStream(proccess.getInputStream())
        while (line = stream.readLine())
          lines.push(line + '')
        stream.close()    
      }
      return lines
    }
function ( cmd ) { var lines = [ ] , line with ( JavaImporter ( java . lang , java . io ) ) { var proccess = Runtime . getRuntime ( ) . exec ( Array . prototype . slice . call ( arguments ) ) var stream = new DataInputStream ( proccess . getInputStream ( ) ) while ( line = stream . readLine ( ) ) lines . push ( line + '' ) stream . close ( ) } return lines }
Execute the given _cmd_, returning an array of lines from stdout.

Examples:

Growl.exec('growlnotify', '-m', msg)

@param  {string ...} cmd
@return {array}
@api public
Execute the given _cmd_ returning an array of lines from stdout .