Reputation: 35
I am writing a TCL scripts which expects command line arguments. Say the name of my script is myTcl.tcl , and in this case , invoking script with the command line arguments will look something like :
./myTcl.tcl -optA optA_arg1 optA_arg2 -optB -optC
How can I handle these in TCL ?(Is there any TCL equivalent of getopts from bash and if not , then how can it be done)
Thanks
Upvotes: 0
Views: 1492
Reputation: 4813
There are several getopt-like implementations available. I prefer the one I wrote. There's also the cmdline command in tcllib and other options you can find on the Tcl wiki.
Upvotes: 1