6
[[:print:]] ) echo "$1 is a printable character.";;& # |
7
# The ;;& terminator continues to the next pattern test. |
8
[[:alnum:]] ) echo "$1 is an alpha/numeric character.";;& # v
9
[[:alpha:]] ) echo "$1 is an alphabetic character.";;& # v
10
[[:lower:]] ) echo "$1 is a lowercase alphabetic character.";;&
11
[[:digit:]] ) echo "$1 is an numeric character.";& # |
12
# The ;& terminator executes the next statement ... # |
13
%%%@@@@@ ) echo "********************************";; # v
14
# ^^^^^^^^ ... even with a dummy pattern.
21
# 3 is a printable character.
22
# 3 is an alpha/numeric character.
23
# 3 is an numeric character.
24
# ********************************
28
# m is a printable character.
29
# m is an alpha/numeric character.
30
# m is an alphabetic character.
31
# m is a lowercase alphabetic character.
35
# / is a printable character.
39
# The ;;& terminator can save complex if/then conditions.
40
# The ;& is somewhat less useful.