====== Getting started with Tcl : example 1 ====== This page is part of the Airplug documentation related to Tcl/Tk.\\ [[en:doc:pub:tcltk:start|Back to the Tcl/Tk documentation page]] / [[en:doc:summary|Back to the Airplug documentation page]] ===== Hello World ===== A first script, with comments, printing and special characters. To run such a script on a UNIX computer, you can copy-paste it and add the execution right: cat > example1.tcl (paste with the mouse + Ctrl C) chmod +x example1.tcl ./example1.tcl ==== Script ==== #!/usr/bin/tclsh # this is a comment # printing puts stdout {Hello World} # Carriage return puts stdout "This is a long sentence, which is\ cut in my script." # Special characters set dollar \$ puts stdout "dollar = $dollar" ==== Output ==== Hello World This is a long sentence, which is cut in my script. dollar = $
---- This page is part of the Airplug documentation related to Tcl/Tk.\\ [[en:doc:pub:tcltk:start|Back to the Tcl/Tk documentation page]] / [[en:doc:summary|Back to the Airplug documentation page]]