3

Any one knows how can I invoke the tclsh in the Tcl code due to different paths to tclsh in various platforms (Linux, SUN)?

For example in SUN:

#!/usr/bin/sun/tclsh

in Linux:

#!/usr/bin/linux/tclsh

How can I use the same Tcl code and execute it in the above two paths?

Donal Fellows
  • 133,037
  • 18
  • 149
  • 215
user364128
  • 31
  • 1

1 Answers1

6

Use the env(1) as in

#!/usr/bin/env tclsh

Also read the shebang article.

Nikolai Fetissov
  • 82,306
  • 11
  • 110
  • 171