Pegasus InfoCorp: Web site design and web software development company

subst (n)

Perform backslash, command, and variable substitutions

SYNOPSIS

    subst ?-nobackslashes? ?-nocommands? ?-novariables? string

DESCRIPTION

    This command performs variable substitutions, command substitutions, and backslash substitutions on its string argument and returns the fully-substituted result. The substitutions are performed in exactly the same way as for Tcl commands. As a result, the string argument is actually substituted twice, once by the Tcl parser in the usual fashion for Tcl commands, and again by the subst command.

    If any of the -nobackslashes, -nocommands, or -novariables are specified, then the corresponding substitutions are not performed. For example, if -nocommands is specified, no command substitution is performed: open and close brackets are treated as ordinary characters with no special interpretation.

    Note: when it performs its substitutions, subst does not give any special treatment to double quotes or curly braces. For example, the script set a 44 subst {xyz {$a}} returns ``xyz {44}'', not ``xyz {$a}''.

KEYWORDS

    backslash substitution, command substitution, variable substitution '\" '\" Copyright (c) 1996, Expert Interface Technologies '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" '\" The definitions below are for supplemental macros used in Tix '\" manual entries. '\" '\" .HS name section [date [version]] '\" Replacement for .TH in other man pages. See below for valid '\" section names. '\" '\" .AP type name in/out [indent] '\" Start paragraph describing an argument to a library procedure. '\" type is type of argument (int, etc.), in/out is either "in", "out", '\" or "in/out" to describe whether procedure reads or modifies arg, '\" and indent is equivalent to second arg of .IP (shouldn't ever be '\" needed; use .AS below instead) '\" '\" .AS [type [name]] '\" Give maximum sizes of arguments for setting tab stops. Type and '\" name are examples of largest possible arguments that will be passed '\" to .AP later. If args are omitted, default tab stops are used. '\" '\" .BS '\" Start box enclosure. From here until next .BE, everything will be '\" enclosed in one large box. '\" '\" .BE '\" End of box enclosure. '\" '\" .VS '\" Begin vertical sidebar, for use in marking newly-changed parts '\" of man pages. '\" '\" .VE '\" End of vertical sidebar. '\" '\" .DS '\" Begin an indented unfilled display. '\" '\" .DE '\" End of indented unfilled display. '\"