Beruflich Dokumente
Kultur Dokumente
Basic Language
Features
; or newline
statement separator
#
var
var(index)
var(i,j)
$var
$fvargxyz
[expr 1+2]
n$
\hello $a"
fhello $ag
comment
simple variable
associative array variable
multi-dimensional array variable
variable substitution
variable substitution
command substitution
backslash substitution (see below)
quoting with substitution
quoting no substitution (deferred evaluation)
nb
nf
nn
nr
nt
nv
nspace
nnewline
nddd
nxdd
nc
backspace (0x8)
form feed (0xC)
newline (0xA)
carriage return (0xD)
horizontal tab (0x9)
vertical tab (0xB)
space
space
octal value (d=0-7)
hexadecimal value (d=0-9, a-f)
replace `nc' with `c'
argc
argv
argv0
auto path
env
errorCode
errorInfo
tcl interactive
tcl precision
tcl prompt1
tcl prompt2
Backslash
Substitutions
na
audible alert (0x7)
Built-In Variables
number of command line arguments
Library Procedures
Operators
(inunary
decreasing
precedence)
~!
minus, bitwise NOT, logical NOT
*/%
+-
Math
Functions
abs
absolute value
acos
asin
atan
atan2
ceil
cos
cosh
double
exp
oor
fmod
hypot
int
log
log10
pow
round
sin
sinh
sqrt
tan
tanh
arc cosine
arc sine
arc tangent
arc tangent of x=y
round up to nearest integer
cosine
hyperbolic cosine
convert to
oating point
regex*
regex+
regex?
.
^
$
nc
c
[abc]
[^abc]
[a-z]
[^a-z]
()
ex
p
xy
Regular
Expressions
regexjregex
match either expression
Filename
Globbing
?
match any single character
*
match zero or more characters
[abc]
match set of characters
[a-z]
match range of characters
nc
match character c
fa,b,...g
match any of strings a, b, etc.
~
home directory
~user
match user's home directory
A \." at the beginning of a le's name or just after \/" must
be matched explicitly. All \/" characters must be matched
explicitly.
Features
of exec
Command
j
pipe (stdout)
j&
< leName
<@ leId
<< value
> leName
2> leName
>& leName
>> leName
2>> leName
>>& leName
>@ leId
2>@ leId
>&@ leId
&
Built-In Commands