word in [ [(] pattern [ | pattern ] ... ) list ;; ] ... esac
A case command first expands word, and tries to match it against
each pattern in turn, using the same matching rules as for path-
name expansion (see Pathname Expansion below). When a match is
found, the corresponding list is executed. After the first
match, no subsequent matches are attempted. The exit status is
zero if no pattern matches. Otherwise, it is the exit status of
the last command executed in list.
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |