Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How can I pass parameter to a *.tcl file

Status
Not open for further replies.

madhusudhan_prabhu

Newbie level 4
Newbie level 4
Joined
Apr 15, 2008
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,322
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"

Please somebody help me.

Regards,
Madhusudhan Prabhu
 

Hi Madusudan,

Can you provide complete script here,that will help to find out issue with that script.
 
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

Thanks
Teja
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top