|
C |
CfgTie::CfgArgs -- Configuration module for parsing commandline arguments
This module is meant to help create useful configuration tools and utilities.
A tool to allow many of your computer's subsystems to be configured. This module parses commandline arguments. It is provided to help create a standardized lexicon.
To specify how much of your system should be affected by the change in settings:
--scope=session|application|user|group|system
In addition, each of the individual parts can specified (instead of their defaults):
--application=NAME--application NAME--user=NAME--user NAME--group=NAME--group NAME
The specific operation to be done:
--op=set|unset|remove|delete|exists|fetch|get|copy|rename
or:
--copy name1=name2 name3=name4 ...
--exists name1 name2 name3 ...
--test name1=value1 name2=value2 ...
--unset name1 name2 ...
--delete NAME--delete=NAME--fetch NAME--fetch=NAME--remove NAME--remove=NAMEdelete above, this will remove the entry specified by NAME. NAME
may be a regular expression.
--rename NAME-NEW=NAME-OLD
s/NAME-OLD/NAME-NEW/
--set NAME=VALUEThe variable names are optional, and can be explicitly specified:
--name
Otherwise it is assumed to be the first no flag parameter.
Similarly, the value can be specified
--value
--file FILE--file=FILE--comment COMMENT--comment=COMMENT
-n,
--dry-run,
--just-print
--recon
With these flags, the utility program should not modify any files. Instead, it should merely document what changes it would make, what programs it would run, etc.
--copyright
--help
--info
--information
--manual
--verbose
--version
--warranty
If the operation exists the return value is zero, otherwise it is nonzero.
The hash return:
{
SCOPE=> session,application,user,group,system
OP => COPY, RENAME, STORE, DELETE, FETCH, or EXISTS
KEY =>
VALUE=>
}
Randall Maas (mailto:randym@acm.org, http://www.hamline.edu/~rcmaas/)
|
C |