A script is code written in the language of an interpreter such as Tcl.
In Tcl, a script is a collection of 1 or more Tcl commands separated by semicolon or newline. A script can be handed to Tcl in various ways:
A script often provides a library for use by other scripts.
Tcl's sparse syntax makes it particularly convenient to embed code written in another language directly into a Tcl script. SQL, Perl, ksh, awk, or even C code can then be handed off to to some other interpreter for evaluation. SQL is probably the most well-known example of this. When dynamically generating scripts for another language, it is necessary to be aware of possible injection attacks.