Hello:
Within a tcl script, I'm sourcing another tcl script. I'm trying to redirect the output of the sourced tcl script to a file. Here is the code I've written to attempt this:
set fd [open $OutFileName a]
puts $fd [source Master.tcl]
close $fd
OutFileName has been defined eariler in the program. When I run this, OutFileName is created, but the output goes to stdout and not OutFileName.
Any ideas as to what I am doing wrong? Thanks in advance.
Tom
Within a tcl script, I'm sourcing another tcl script. I'm trying to redirect the output of the sourced tcl script to a file. Here is the code I've written to attempt this:
set fd [open $OutFileName a]
puts $fd [source Master.tcl]
close $fd
OutFileName has been defined eariler in the program. When I run this, OutFileName is created, but the output goes to stdout and not OutFileName.
Any ideas as to what I am doing wrong? Thanks in advance.
Tom