I’d like to have a command line invocation of my ruby script that looks
like the following:
Usage: vmci.rb [options] command args …
-h, -?, --help generate this usage message
-l, --log-file FILE Identifies a log file to use.
-e, --log-level LOGLEVEL desired level of logging.
-x Bypass display of configuration
one of the command recognized by vmci.rb
any necessary arguments associated with the given command
I can’t figure out how to get at the “command” and “args” portions of
the command line using OptionParser. Since a variable number of options
may exist on the command line before the command, it’s not intuitive to
me how to know which element of the ARGV array to use, or how to extract
these values via OptionParser.
Can someone give me a little direction?
thundernet development group