Skip to content

Instantly share code, notes, and snippets.

View toddnestor's full-sized avatar

Todd D Nestor toddnestor

View GitHub Profile
require 'net/ssh'
require 'optparse'
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: ruby permission.rb [-h some-host-option -a lock -u garion]"
%i{host user action}.each do |option|
opts.on("-#{option[0]}VALUE", "--#{option}=VALUE") do |value|