I am using an outside script from tcl. The script gives its result as a print out to stdout, so I use the command
set scriptRes [exec ${dir}/bin/script $obm_file]
$obm_file
is an arguments for the script, the name of the input file for it.
In some cases the input file is not perfect, so the script will give good output and then will give an error, it prints the error message to stderr. Is there a way to tell tcl to take only the "good" output, i.e. the output that went to stdout, and disregard the error message?