Command-Line Options

The standard Tcl shell program tclsh accepts a command line of the form:

tclsh [fileName] [arg ...]

where filename is an optional file from which to read Tcl commands. With no filename argument, tclsh runs interactively using standard input and output.

The filename and any additional arguments are stored in the Tcl variables argc, argv, and argvO (see the section "Special Variables“).

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.