-1

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.

Donal Fellows
  • 133,037
  • 18
  • 149
  • 215
  • You need to do some basic research yourself. I just answered another similar question. Try googling tcl and operating system information together. – patthoyts Feb 06 '13 at 12:53
  • It's not a question on OS. I have clearly mentioned that I need to know how to negate the result of 3 and conditions evaluated together – user2046535 Feb 06 '13 at 13:11

1 Answers1

1

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.

Donal Fellows
  • 133,037
  • 18
  • 149
  • 215