#!/usr/bin/tclsh not working
Hi:
I tried the following simple script with tclsh:
#!/usr/bin/tclsh
puts stdout {Hello, World!}
( from Brent B. Welch, Practical Programmin in Tcl and Tk)
made the file (Hello) executable and typed . hello
and I get the error bash: puts: command not found.
I also tried
#!/usr/bin/sh
exec tclsh "$0" "$@"
puts stdout {Hello, World!}
This does not work either.
However if I type
wish hello
it works.
I thought that perhaps because tclsh was linked to
/etc/alternatives/tclsh there was a problem. So I copied
tclsh8.2 to TCLSH and used in the first line TCLSH instead
of tclsh, and it still does not work.
Is this a bug in the tclsh program, that when it is in a script
it can only be called by wish?
Can someone give me a hint about what s going on here and whether
I can get around this. I am using Debian Linux, Potato.
Thanks
Sebastian Canagaratna
Department of Chemistry
Ohio Northern University
Ada, OH 45810
Reply to: