Hi,
I want to pass parameter to a tcl file.
e.g.
test.tcl file contains:
set i [lindex $argv 0]
When I use the following command : source test.tcl 9
on the TCL prompt it gives an error.
tcl prompt:
% source test.tcl 9
wrong # args: should be "source fileName"
Source will accept only one argument that is script name only.
If you want execute the script, just give executable permissions to the script.
If you are in tcl shell,
tcl> exec test.tcl 9
You will have your required o/p.
If u r in unix shell.
unix>./test.tcl 9