Tcl
Using the Command Line


return to main index



Step 1
Using a text editor save the script shown below as demo.tcl

    puts [expr 3 + 2]
Step 2
Open a terminal/command window and "cd" to the directory in which you previously saved the demo.tcl script. If you are using UNIX - Linux or Mac OS X - enter the following command to make the script executible,

    chmod 777 demo.tcl
Step 3
Enter the following command to invoke ie. run, the script,

    tclsh demo.tcl

The number "5" should appear in the terminal/command window.




© 2002- Malcolm Kesson. All rights reserved.