tksh(1) USER COMMANDS tksh(1)
Tksh is a version of KornShell with a set of additional builtin commands that provide ksh with the functionality of Tcl/Tk. With Tksh, KornShell can be used to write graphical interface scripts with the Tk library. Tksh can also interpret Tcl scripts for backward compatibility.
Invoked as ksh, Tksh will initialize neither Tcl nor Tk.
Invoked as tksh, Tksh will initialize both Tcl and Tk.
Invoked as tclksh, Tksh will initialize Tcl but not Tk.
Invoked as tclksh, Tksh is initialized to be used with Tcl only (not Tk). As a result, a set of builtin commands are added that provide Tcl functionality. Tcl built-in commands are added, but their names begin with tcl_ to avoid conflicts with ksh and UNIX commands. In addition, the source command is added, which can be used to interpret Tcl scripts.
Invoked as tksh, Tksh is initialized to be used with both Tcl and Tk. This does everything that tclksh does, and initializes Tk as well. Initializing Tk includes adding the set of Tk commands (their names are unmodified) and initializing a main window.
The following builtins are created when Tcl is initialized:
The following builtins are created when Tk is initialized:
If Tksh is compiled as a shared library, it can be dynamically loaded into ksh93. In order to do this, the Tksh library must be in a directory in the $LD_LIBRARY_PATH variable. If it not, the command "builtin -f tksh_library_name" can be used.
There are two builtin commands that exist to initialize Tcl or Tk. tclinit initializes only Tcl, and tkinit initializes Tcl and Tk. To use either of these commands, the builtin command must be used (e.g., "builtin tkinit").
Tksh will not work well interactively as a shared library if you are using a version of ksh earlier than 93e.
March 06, 1997