Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different search paths for tclsh

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?

like image 719
user364128 Avatar asked Dec 04 '25 19:12

user364128


1 Answers

Use the env(1) as in

#!/usr/bin/env tclsh

Also read the shebang article.

like image 78
Nikolai Fetissov Avatar answered Dec 06 '25 10:12

Nikolai Fetissov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!