Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

exec issue in TCL 8.4

Status
Not open for further replies.

zombieZero

Technical User
Apr 7, 2004
28
US
I was previously running TCL 8.3 and there is a bit in our infrastructure here that basically execs another file. So, within a method, I have something like:

eval exec module1.tcl $args

Then inside module1.tcl it parses the args, etc and runs a series of commands.

This worked fine in tcl 8.3 but when I upgrade to 8.4, I get an error whenever the exec command is called. It complains "Command not found" every time it encounters any commands inside module1.tcl - when I tried to put some debug in and added a 'puts' to the very start of module1.tcl, it complained that the command 'puts' was not found.

Does anyone out there know what might explain this behavior?
 
I'm surprised it worked in 8.3. I think the command you want to execute is "tclsh", and then pass "module1.tcl" as the first argument.

_________________
Bob Rashkin
 
Thanks - it did turn out to be related to tclsh, at the head of the script was the line #!/usr/bin/tcl and as fate would have it 8.4 no longer has tclx as a separate binary which seemed to get rid of the tcl executable. I replaced it with #!/usr/bin/env tclsh and that seemed to fix the problem.

Thanks as always Bong for the response ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top