I need to change the following piece of code from shell to tcl.
if (!$?OSTYPE && $?OSREV && $?HOST))then
I need to know how to combine all the and conditions and then negate the combined result in tcl.
I need to change the following piece of code from shell to tcl.
if (!$?OSTYPE && $?OSREV && $?HOST))then
I need to know how to combine all the and conditions and then negate the combined result in tcl.
In csh, $?FOO
is a boolean value that says whether the environment variable FOO
is set. In Tcl, you'd use [info exists ::env(FOO)]
to mean the same thing (and other variables can be tested this way too, of course, provided you can name them). Everything else is much more recognizably similar.