jrw32982: This is the only way I've found that works on a plain vanilla tcl 8.4 to detect if stdin is set to a terminal or a file/pipe/socket
set interactive [ expr ! [ catch { exec /bin/sh -c { [ -t 0 ] }}]]