redhat man page for subst

Query: subst

OS: redhat

Section: n

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

subst(n)						       Tcl Built-In Commands							  subst(n)

__________________________________________________________________________________________________________________________________________________

NAME
subst - 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}''.
SEE ALSO
eval(n)
KEYWORDS
backslash substitution, command substitution, variable substitution Tcl 7.4 subst(n)
Related Man Pages
subst(1t) - opensolaris
subst(n) - centos
tcl_substobj(3) - opendarwin
tcl_substobj(3) - osx
subst(ntcl) - mojave
Similar Topics in the Unix Linux Community
how to fetch substring from records into another file
using substring in shell script
Help with sed substitution
Korn expr substr fails for non-numeric value
Bad substitution - ShellCheck says okay