Does anyone know a standard package for tcl to easily parse the input arguments ? or a ready proc ? ( I have only 3 flags but something general is preferable ).
相关问题
- Is it possible to pass command-line arguments to @
- Printing out source hierarchy with large TCL proje
- How to use mutually exclusive flags in your shell
- TCL Email Script doesn't deliver in Activestat
- Script Argument matching
相关文章
- Passing command line arguments to Java via ant bui
- Get command line arguments as string
- Equals returning false in c++
- Are the strings in argv modifiable?
- format specifies type 'char *' but the arg
- String Range forward and backward lookaround
- What JDBC property corresponds to mysql command li
- Send parameters to a running application in C#
The documentation includes an example. Here is a simple example:
Sample runs:
Discussion
.arg
).-help
or-?
, however, the output is not pretty, see the last sample run.Update: Help/Usage
I have been thinking about the message output when the user invoke help (see the last sample run above). To get around that, you need to trap the error yourself:
Sample run 2:
Tcllib has such a package, cmdline. It's a bit underdocumented, but it works.