#!/usr/bin/env ruby require "Getopt/Declare" specification = %q% -list ... ttt -out ttt in= ttt +range .. ttt --lines - ttt ignore bad lines ttt ttt -copy ... copy files to dir -range [[..] [] ] opt. range { to = 10 if to == "" } % args = Getopt::Declare.new(specification) puts args.inspect