Using info
alone should work:
# Both environment variables must exist
if {[info exists env(VARIABLE_1)] && [info exists env(VARIABLE_2)]} {
# true: do something
} else {
# false: do something different
}
Since info
returns a boolean, if
handles it fine and you don't neet expr
. The above works on my machine.