|Text-only||Table of Contents (frame/ no frame)|
|(19) Flow control (contd.)|
word in pattern) list;; esac
(ksh and bash only) A pattern-list is a list of one or more patterns separated from each other with a |. Composite patterns can be formed with one or more of the following:
- Optionally matches any one of the given patterns.
- Matches zero or more occurrences of the given patterns.
- Matches one or more occurrences of the given patterns.
- Matches exactly one of the given patterns.
- Matches anything, except one of the given patterns.
case $filename in *.dat) echo Processing a .dat file ;; *.sas) echo Processing a .sas file ;; *) # catch anything else that doesn't match patterns echo "Don't know how to deal with $filename" ;; esac
whileor processing the next element of a
( ... )Command grouping
|flow-control-2.src last modified Mar 10, 2005||Introduction||Table of Contents
|© Dartmouth College|