Provided by:
manpages-zh_1.5.2-1_all 
NAME
switch -
SYNOPSIS
switch ?options? string pattern body ?pattern body ...?
switch ?options? string {pattern body ?pattern body ...?}
_________________________________________________________________
DESCRIPTION
switch pattern () string pattern string() body Tcl pattern
default pattern string switch
switch - :
-exact string
-glob string ( string match )
-regexp string ( re_syntax )
-- - string
pattern body switch pattern
body ``-'' body (-) body
switch
switch :
switch abc a - b {format 1} abc {format 2} default {format 3}
2,
switch -regexp aaab {
^a.*b$ -
b {format 1}
a* {format 2}
default {format 3}
}
1,
switch xyz {
a
-
b
{
# Correct Comment Placement
format 1
}
a*
{format 2}
default
{format 3}
}
3.
SEE ALSO
for(n), if(n), regexp(n)
KEYWORDS
switch, match, regular expression
[]
[]
2001/11/15
Linux man :
http://cmpp.linuxforum.net