I want to redirect the output of 1 command to a variable, where the OUTPUT is usually to STDOUT. I am running an EDA tool, which has tcl interpeter & it's own commands. Let's say that the tool has a tcl query, which says
TOOL> find_transistor m*
m1 m2 m3 m4
I want to have a way of doing the following:
TOOL> set ret redirect {find_transistor m*}
TOOL> puts $ret
m1 m2 m3 m4
Any ideas?