Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)

sh(1) OSS Shell and Utilities Reference Manual
? Matches any single character.
[...] Matches any one of the enclosed characters. In an expression such as [a-z], the -
(dash) means "through" according to the current collating sequence. The collating
sequence is determined by the value of the LC_COLLATE environment variable. If
the first character following the [ (left bracket) is a ! (exclamation point), then any
character not enclosed is matched. A - can be included in the character set by putting it
as the first or last character.
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.
830 Hewlett-Packard Company 527188-021