2
0

single_command.rb 242 B

1234567891011121314
  1. #! /usr/bin/ruby
  2. require 'ESL'
  3. HOST = '127.0.0.1'.to_s
  4. PORT = '8021'.to_s
  5. PASSWORD = 'ClueCon'.to_s
  6. command = ARGV.join(" ")
  7. con = ESL::ESLconnection.new(HOST,PORT,PASSWORD)
  8. e = con.sendRecv('api ' + command)
  9. puts e.getBody