0
votes

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 ?

1
Does your script htave the required shebang line? e.g. #!/usr/local/bin/tclsh?Johannes Kuhn

1 Answers

2
votes

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.