|
|
The .SM GLOBIGNORE shell variable may be used to restrict the set of file names matching a .IR pattern . If .SM GLOBIGNORE is set, each matching file name that also matches one of the patterns in .SM GLOBIGNORE is removed from the list of matches. The file names ``.'' and ``..'' are always ignored, even when .SM GLOBIGNORE is set. However, setting .SM GLOBIGNORE has the effect of enabling the dotglob shell option, so all other file names beginning with a ``.'' will match. To get the old behavior of ignoring file names beginning with a .BR ``.'' , make ``.*'' one of the patterns in .SM .BR GLOBIGNORE . The dotglob option is disabled when .SM GLOBIGNORE is unset.
Pattern Matching\fP
Any character that appears in a pattern, other than the special pattern characters described below, matches itself. The NUL character may not occur in a pattern. The special pattern characters must be quoted if they are to be matched literally.
The special pattern characters have the following meanings:
.if n alnum alpha ascii blank cntrl digit graph lower print punct space upper xdigit
.if t alnum alpha ascii blank cntrl digit graph lower print punct space upper xdigit
A character class matches any character belonging to that class.
.if t .sp 0.5
.if n .sp 1
Within
[
and
.BR ] ,
an equivalence class\fP can be specified using the syntax
[=\fPc\fP=]\fP, which matches all characters with the
same collation weight (as defined by the current locale) as
the character c\fP.
.if t .sp 0.5
.if n .sp 1
Within
[
and
.BR ] ,
the syntax [.\fPsymbol\fP.]\fP matches the collating symbol
symbol\fP.
If the extglob\fP shell option is enabled using the shopt\fP builtin, several extended pattern matching operators are recognized. In the following description, a pattern-list\fP is a list of one or more patterns separated by a |\fP. Composite patterns may be formed using one or more of the following sub-patterns: .sp 1
Web: http://shell.tjgy.com Email:support@tjgy.com