Version 1 of Is tclsh running interactively?

Updated 2013-05-29 11:13:27 by RFox

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 ] }}]]

RFox - 2013-05-29 11:13:27

What about checking the value of tcl_interactive?