Suppose i have a tcl file to be run, say test.tcl.. and i want to specify the file to be tested, say test.tcl file1. wha do i do to extract "file1" from the command line and perform the test on the file.. i need a tcl command, that helps extract the argument from the command line..
Suppose i have a tcl file to be run, say test.tcl.. and i want to specify the file to be tested, say test.tcl file1. wha do i do to extract "file1" from the command line and perform the test on the file.. i need a tcl command, that helps extract the argument from the command line..
All Tcl scripts have access to three predefined variables.
$argc - number items of arguments passed to a script.
$argv - list of the arguments.
$argv0 - name of the script.