Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
ksh(1) OSS Shell and Utilities Reference Manual
A pattern_list is a list of one or more patterns separated from each other with a | (vertical bar).
Composite patterns can be formed with one or more of the following:
?(pattern_list)
Optionally matches any one of the given patterns.
*(pattern_list)
Matches zero or more occurrences of the given patterns.
+(pattern_list)
Matches one or more occurrences of the given patterns.
@@@@(pattern_list)
Matches exactly one of the given patterns.
!(pattern_list)
Matches anything, except one of the given patterns.
Character Classes
You can use the following notation to match filenames within a range indication:
[:charclass:]
This format instructs the system to match any single character belonging to charclass; the
defined classes correspond to ctype() subroutines as follows:
alnum
alpha
blank
cntrl
digit
graph
lower
print
punct
space
upper
xdigit
Your locale might define additional character properties, such as the following:
[:vowel:]
The preceding character class could be TRUE for a, e, i, o, u,ory. You could then use [:vowel]
inside a set construction to match any vowel. Refer to The LC_CTYPE Category section of the
locale file format reference page for more information.
Quoting
The following characters have a special meaning to the shell and cause termination of a word
unless quoted:
;&()|ˆ < > <newline> <space> <tab>
Each of the metacharacters previously listed has a special meaning to the shell and causes termi-
nation of a word unless quoted. A character can be quoted (that is, made to stand for itself) by
preceding it with a \ (backslash). The pair \newline is ignored. All characters enclosed between
a pair of ‘’ (single quotes) are quoted. A single quote cannot appear within single quotes.
Inside "" (double quotes) parameter and command substitution occurs and \ quotes the characters
\, ‘, ’, and $. The meaning of $* and $@@@@ is identical when not quoted or when used as a
5−16 Hewlett-Packard Company 527188-004