Various search paths for tclsh

Does anyone know how I can call tclsh in Tcl code due to different paths to tclsh on different platforms (Linux, SUN)?

For example, in SUN:

#!/usr/bin/sun/tclsh

on Linux:

#!/usr/bin/linux/tclsh

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

+3
source share
1 answer

Use env(1)as in

#!/usr/bin/env tclsh

Also read the shebang article .

+6
source

Source: https://habr.com/ru/post/1749507/


All Articles