Link to home
Start Free TrialLog in
Avatar of gdspeare
gdspeare

asked on

Simple Tcl on Solaris

I have a pretty simple question.  I'm just trying to do a simple "hello world" example to get my brain moving.  

I'm trying to run (in a putty shell):

exec <myfile.tcl>

#!<tcl path here>

set outfile [open ["home/myid/myfile.txt w]
puts $outfile "here is my test"
puts "done"

however when i do, my putty window is closing down and my file is not being created.  I have verified that i have rwxrwxr-x permissions on the file (not getting a permissions conflict)

Pretty new to unix so thanks for the help.
ASKER CERTIFIED SOLUTION
Avatar of torakeshb
torakeshb
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gdspeare
gdspeare

ASKER

my tcl shell isn't in the the directory /usr/bin/tcl and some of the libraries it calls certainly are not.
give the command "which tcl" will show the location of your tcl. You can change the location as per your system configuration.
Not familiar with this command.

I tried unix command: command "which tcl" which resulted in

/usr/bin/command[s]: which tcl: not found
do you tcl installed? if you know the location of tcl then point to the tcl binary.