I want to know how to use switches at the command line in expect
just like getopts
in bash
scripts.
Thanks in advance
I want to know how to use switches at the command line in expect
just like getopts
in bash
scripts.
Thanks in advance
See How to pass argument in expect through command line in shell script and http://www.tcl.tk/man/expect5.31/expect.1.html (Usage section).
Update: Expect is based on Tcl, and the usual method in Tcl to parse optional arguments from the command line as in getopts
is the cmdline library package. This is part of tcllib, so you might need to install that if it's not already on your system.