Question

I am new to TCL scripting and trying to run the script from terminal.

If i run the script like

tclsh myscript.tcl 

then the script is executing without any issue.

But, if I run directly without "tclsh", then it is throwing error as follows,

./myscript.tcl
./myscript: Command not found.

I have given the execution permission for that file.

I have added the tclsh path in the PATH variable

echo  $PATH
/usr/local/bin:/bin:/usr/bin:/usr/bin/tclsh

Can anyone help me on this ?

Was it helpful?

Solution

Try with adding:

#!/usr/bin/tclsh

In the beginning of your script.

If still doesn't work please show us your script you're trying to run, maybe there's something wrong.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top