#!/usr/bin/env ruby require './strace_parser.rb' require 'slop' opts = Slop.parse do |o| o.string '-f', '--file', 'a filename to read' o.bool '-c', '--count', 'enable count of systemcall output' #puts Slop::VERSION #exit end ARGV #=> --filename /path/to/strace_file.out hash = opts.to_hash #=> { host: "192.168.0.1", login: "alice", port: 80, verbose: true, quiet: false, check_ssl_certificate: true } file = hash[:file] count = hash[:count] parser = StraceParser.new(file) #binding.pry if count puts parser.sys_call_counts end