clandestin
IS-IT--Management
Hello,
I'm trying to start an application with a tcl proc and catch the output of that application into a file.
For now I could only manage to start it like this:
set output [catch { exec myprogram } ]
set output_file [open "$env(HOME)/.output.log" "w"]
puts $output_file $output
close $output_file
But this returns only a 0 or a 1 depending how the program exited.
Is there any other way to get the full output from my progam in file?
doing something like this won't work :
set output [catch { exec myprogram >> logfile} ]
I'm trying to start an application with a tcl proc and catch the output of that application into a file.
For now I could only manage to start it like this:
set output [catch { exec myprogram } ]
set output_file [open "$env(HOME)/.output.log" "w"]
puts $output_file $output
close $output_file
But this returns only a 0 or a 1 depending how the program exited.
Is there any other way to get the full output from my progam in file?
doing something like this won't work :
set output [catch { exec myprogram >> logfile} ]