views:

37

answers:

1

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?

+5  A: 

Use the env(1) as in

#!/usr/bin/env tclsh

Also read the shebang article.

Nikolai N Fetissov