2004-11-03 13:51:07 +00:00
|
|
|
.\" Copyright (c) 1998 Andries Brouwer
|
|
|
|
.\"
|
|
|
|
.\" This is free documentation; you can redistribute it and/or
|
|
|
|
.\" modify it under the terms of the GNU General Public License as
|
|
|
|
.\" published by the Free Software Foundation; either version 2 of
|
|
|
|
.\" the License, or (at your option) any later version.
|
|
|
|
.\"
|
|
|
|
.\" The GNU General Public License's references to "object code"
|
|
|
|
.\" and "executables" are to be interpreted as the output of any
|
|
|
|
.\" document formatting or typesetting system, including
|
|
|
|
.\" intermediate and printed output.
|
|
|
|
.\"
|
|
|
|
.\" This manual is distributed in the hope that it will be useful,
|
|
|
|
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
.\" GNU General Public License for more details.
|
|
|
|
.\"
|
|
|
|
.\" You should have received a copy of the GNU General Public
|
|
|
|
.\" License along with this manual; if not, write to the Free
|
|
|
|
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
|
|
|
|
.\" USA.
|
|
|
|
.\"
|
|
|
|
.\" 2003-08-24 fix for / by John Kristoff + joey
|
|
|
|
.\"
|
2012-07-28 06:12:16 +00:00
|
|
|
.TH GLOB 7 2012-07-28 "Linux" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
|
|
|
glob \- Globbing pathnames
|
|
|
|
.SH DESCRIPTION
|
intro.1, time.1, accept.2, bind.2, connect.2, execve.2, flock.2, getdents.2, getpriority.2, getuid.2, intro.2, ioctl.2, mincore.2, mknod.2, personality.2, ptrace.2, read.2, recv.2, select_tut.2, send.2, sendfile.2, shmctl.2, sigaction.2, signal.2, stat.2, times.2, truncate.2, umask.2, wait.2, MB_CUR_MAX.3, MB_LEN_MAX.3, argz_add.3, btowc.3, clearenv.3, clock.3, cmsg.3, end.3, endian.3, errno.3, exit.3, fgetwc.3, fgetws.3, fopen.3, fputwc.3, fputws.3, fseek.3, fwide.3, getfsent.3, getgrnam.3, gethostid.3, getipnodebyname.3, getmntent.3, getpwnam.3, getwchar.3, grantpt.3, iconv.3, iconv_close.3, iconv_open.3, insque.3, intro.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, malloc.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, mkstemp.3, mktemp.3, nl_langinfo.3, openpty.3, posix_openpt.3, printf.3, ptsname.3, putwchar.3, qecvt.3, rcmd.3, readdir.3, rexec.3, rpc.3, setnetgrent.3, shm_open.3, sigpause.3, stdin.3, stpcpy.3, strftime.3, strptime.3, syslog.3, towctrans.3, towlower.3, towupper.3, ttyslot.3, ungetwc.3, unlocked_stdio.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscasecmp.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcsdup.3, wcslen.3, wcsncasecmp.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcspbrk.3, wcsrchr.3, wcsrtombs.3, wcsspn.3, wcsstr.3, wcstok.3, wcstombs.3, wcswidth.3, wctob.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, wprintf.3, console_ioctl.4, pts.4, elf.5, filesystems.5, hosts.5, proc.5, ttytype.5, boot.7, capabilities.7, credentials.7, epoll.7, glob.7, koi8-r.7, path_resolution.7, pty.7, signal.7, suffixes.7, time.7, unicode.7, unix.7, uri.7, utf-8.7: global fix: s/Unix/UNIX/
The man pages were rather inconsistent in the use of "Unix"
versus "UNIX". Let's go with the trademark usage.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-10-12 04:45:38 +00:00
|
|
|
Long ago, in UNIX V6, there was a program
|
2004-11-03 13:51:07 +00:00
|
|
|
.I /etc/glob
|
|
|
|
that would expand wildcard patterns.
|
Changes.old, clone.2, execve.2, fcntl.2, futex.2, getitimer.2, getpriority.2, mmap.2, mount.2, mprotect.2, sched_setscheduler.2, select_tut.2, setuid.2, sigaltstack.2, vfork.2, div.3, fenv.3, fmod.3, memchr.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_getattr_np.3, queue.3, scanf.3, trunc.3, st.4, proc.5, services.5, utmp.5, bootparam.7, capabilities.7, feature_test_macros.7, futex.7, glob.7, man.7, netlink.7, unicode.7: Switch to American usage: "-wards" ==> "-ward"
American English uses "afterward" in preference to "afterwards",
and so on
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-09-26 05:34:47 +00:00
|
|
|
Soon afterward this became a shell built-in.
|
2004-11-03 13:51:07 +00:00
|
|
|
|
|
|
|
These days there is also a library routine
|
|
|
|
.BR glob (3)
|
|
|
|
that will perform this function for a user program.
|
|
|
|
|
2006-08-03 13:58:08 +00:00
|
|
|
The rules are as follows (POSIX.2, 3.13).
|
2007-06-15 19:55:07 +00:00
|
|
|
.SS "Wildcard Matching"
|
2004-11-03 13:51:07 +00:00
|
|
|
A string is a wildcard pattern if it contains one of the
|
2008-06-09 21:03:52 +00:00
|
|
|
characters \(aq?\(aq, \(aq*\(aq or \(aq[\(aq.
|
2007-04-12 22:42:49 +00:00
|
|
|
Globbing is the operation
|
2004-11-03 13:51:07 +00:00
|
|
|
that expands a wildcard pattern into the list of pathnames
|
2007-04-12 22:42:49 +00:00
|
|
|
matching the pattern.
|
|
|
|
Matching is defined by:
|
2004-11-03 13:51:07 +00:00
|
|
|
|
2008-06-09 21:03:52 +00:00
|
|
|
A \(aq?\(aq (not between brackets) matches any single character.
|
2004-11-03 13:51:07 +00:00
|
|
|
|
2008-06-09 21:03:52 +00:00
|
|
|
A \(aq*\(aq (not between brackets) matches any string,
|
2004-11-03 13:51:07 +00:00
|
|
|
including the empty string.
|
2007-06-15 19:55:07 +00:00
|
|
|
.PP
|
|
|
|
.B "Character classes"
|
|
|
|
.sp
|
2008-06-09 21:03:52 +00:00
|
|
|
An expression "\fI[...]\fP" where the first character after the
|
|
|
|
leading \(aq[\(aq is not an \(aq!\(aq matches a single character,
|
2004-11-03 13:51:07 +00:00
|
|
|
namely any of the characters enclosed by the brackets.
|
|
|
|
The string enclosed by the brackets cannot be empty;
|
2008-06-09 21:03:52 +00:00
|
|
|
therefore \(aq]\(aq can be allowed between the brackets, provided
|
2007-04-12 22:42:49 +00:00
|
|
|
that it is the first character.
|
2008-06-09 21:03:52 +00:00
|
|
|
(Thus, "\fI[][!]\fP" matches the
|
|
|
|
three characters \(aq[\(aq, \(aq]\(aq and \(aq!\(aq.)
|
2007-06-15 19:55:07 +00:00
|
|
|
.PP
|
|
|
|
.B Ranges
|
|
|
|
.sp
|
2004-11-03 13:51:07 +00:00
|
|
|
There is one special convention:
|
2008-06-09 21:03:52 +00:00
|
|
|
two characters separated by \(aq\-\(aq denote a range.
|
2008-06-09 21:12:25 +00:00
|
|
|
(Thus, "\fI[A\-Fa\-f0\-9]\fP"
|
|
|
|
is equivalent to "\fI[ABCDEFabcdef0123456789]\fP".)
|
2008-06-09 21:03:52 +00:00
|
|
|
One may include \(aq\-\(aq in its literal meaning by making it the
|
2004-11-03 13:51:07 +00:00
|
|
|
first or last character between the brackets.
|
2008-06-09 21:03:52 +00:00
|
|
|
(Thus, "\fI[]\-]\fP" matches just the two characters \(aq]\(aq and \(aq\-\(aq,
|
|
|
|
and "\fI[\-\-0]\fP" matches the
|
|
|
|
three characters \(aq\-\(aq, \(aq.\(aq, \(aq0\(aq, since \(aq/\(aq
|
2004-11-03 13:51:07 +00:00
|
|
|
cannot be matched.)
|
2007-06-15 19:55:07 +00:00
|
|
|
.PP
|
|
|
|
.B Complementation
|
|
|
|
.sp
|
2008-06-09 21:03:52 +00:00
|
|
|
An expression "\fI[!...]\fP" matches a single character, namely
|
2004-11-03 13:51:07 +00:00
|
|
|
any character that is not matched by the expression obtained
|
2008-06-09 21:03:52 +00:00
|
|
|
by removing the first \(aq!\(aq from it.
|
|
|
|
(Thus, "\fI[!]a\-]\fP" matches any
|
|
|
|
single character except \(aq]\(aq, \(aqa\(aq and \(aq\-\(aq.)
|
2004-11-03 13:51:07 +00:00
|
|
|
|
2008-06-09 21:03:52 +00:00
|
|
|
One can remove the special meaning of \(aq?\(aq, \(aq*\(aq and \(aq[\(aq by
|
2004-11-03 13:51:07 +00:00
|
|
|
preceding them by a backslash, or, in case this is part of
|
|
|
|
a shell command line, enclosing them in quotes.
|
|
|
|
Between brackets these characters stand for themselves.
|
2008-06-09 21:03:52 +00:00
|
|
|
Thus, "\fI[[?*\e]\fP" matches the
|
|
|
|
four characters \(aq[\(aq, \(aq?\(aq, \(aq*\(aq and \(aq\e\(aq.
|
2007-06-15 19:55:07 +00:00
|
|
|
.SS Pathnames
|
2004-11-03 13:51:07 +00:00
|
|
|
Globbing is applied on each of the components of a pathname
|
2007-04-12 22:42:49 +00:00
|
|
|
separately.
|
2008-06-09 21:03:52 +00:00
|
|
|
A \(aq/\(aq in a pathname cannot be matched by a \(aq?\(aq or \(aq*\(aq
|
|
|
|
wildcard, or by a range like "\fI[.\-0]\fP".
|
2007-04-12 22:42:49 +00:00
|
|
|
A range cannot contain an
|
2008-06-09 21:03:52 +00:00
|
|
|
explicit \(aq/\(aq character; this would lead to a syntax error.
|
2004-11-03 13:51:07 +00:00
|
|
|
|
2008-06-09 21:12:25 +00:00
|
|
|
If a filename starts with a \(aq.\(aq,
|
|
|
|
this character must be matched explicitly.
|
2008-06-09 21:03:52 +00:00
|
|
|
(Thus, \fIrm\ *\fP will not remove .profile, and \fItar\ c\ *\fP will not
|
|
|
|
archive all your files; \fItar\ c\ .\fP is better.)
|
2007-06-15 19:55:07 +00:00
|
|
|
.SS "Empty Lists"
|
2008-06-09 21:03:52 +00:00
|
|
|
The nice and simple rule given above: "expand a wildcard pattern
|
intro.1, time.1, accept.2, bind.2, connect.2, execve.2, flock.2, getdents.2, getpriority.2, getuid.2, intro.2, ioctl.2, mincore.2, mknod.2, personality.2, ptrace.2, read.2, recv.2, select_tut.2, send.2, sendfile.2, shmctl.2, sigaction.2, signal.2, stat.2, times.2, truncate.2, umask.2, wait.2, MB_CUR_MAX.3, MB_LEN_MAX.3, argz_add.3, btowc.3, clearenv.3, clock.3, cmsg.3, end.3, endian.3, errno.3, exit.3, fgetwc.3, fgetws.3, fopen.3, fputwc.3, fputws.3, fseek.3, fwide.3, getfsent.3, getgrnam.3, gethostid.3, getipnodebyname.3, getmntent.3, getpwnam.3, getwchar.3, grantpt.3, iconv.3, iconv_close.3, iconv_open.3, insque.3, intro.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, malloc.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, mkstemp.3, mktemp.3, nl_langinfo.3, openpty.3, posix_openpt.3, printf.3, ptsname.3, putwchar.3, qecvt.3, rcmd.3, readdir.3, rexec.3, rpc.3, setnetgrent.3, shm_open.3, sigpause.3, stdin.3, stpcpy.3, strftime.3, strptime.3, syslog.3, towctrans.3, towlower.3, towupper.3, ttyslot.3, ungetwc.3, unlocked_stdio.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscasecmp.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcsdup.3, wcslen.3, wcsncasecmp.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcspbrk.3, wcsrchr.3, wcsrtombs.3, wcsspn.3, wcsstr.3, wcstok.3, wcstombs.3, wcswidth.3, wctob.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, wprintf.3, console_ioctl.4, pts.4, elf.5, filesystems.5, hosts.5, proc.5, ttytype.5, boot.7, capabilities.7, credentials.7, epoll.7, glob.7, koi8-r.7, path_resolution.7, pty.7, signal.7, suffixes.7, time.7, unicode.7, unix.7, uri.7, utf-8.7: global fix: s/Unix/UNIX/
The man pages were rather inconsistent in the use of "Unix"
versus "UNIX". Let's go with the trademark usage.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-10-12 04:45:38 +00:00
|
|
|
into the list of matching pathnames" was the original UNIX
|
2007-04-12 22:42:49 +00:00
|
|
|
definition.
|
|
|
|
It allowed one to have patterns that expand into
|
2004-11-03 13:51:07 +00:00
|
|
|
an empty list, as in
|
2012-07-28 06:14:15 +00:00
|
|
|
|
2004-11-03 13:51:07 +00:00
|
|
|
.nf
|
2007-04-05 13:29:41 +00:00
|
|
|
xv \-wait 0 *.gif *.jpg
|
2004-11-03 13:51:07 +00:00
|
|
|
.fi
|
2012-07-28 06:14:15 +00:00
|
|
|
|
2004-11-03 13:51:07 +00:00
|
|
|
where perhaps no *.gif files are present (and this is not
|
|
|
|
an error).
|
|
|
|
However, POSIX requires that a wildcard pattern is left
|
|
|
|
unchanged when it is syntactically incorrect, or the list of
|
|
|
|
matching pathnames is empty.
|
|
|
|
With
|
|
|
|
.I bash
|
2012-07-28 06:12:16 +00:00
|
|
|
one can force the classical behavior using this command:
|
|
|
|
|
|
|
|
shopt -s nullglob
|
|
|
|
.\" In Bash v1, by setting allow_null_glob_expansion=true
|
2004-11-03 13:51:07 +00:00
|
|
|
|
2007-04-12 22:42:49 +00:00
|
|
|
(Similar problems occur elsewhere.
|
|
|
|
E.g., where old scripts have
|
2012-07-28 06:14:15 +00:00
|
|
|
|
2004-11-03 13:51:07 +00:00
|
|
|
.nf
|
2008-06-05 12:26:22 +00:00
|
|
|
rm \`find . \-name "*~"\`
|
2004-11-03 13:51:07 +00:00
|
|
|
.fi
|
2012-07-28 06:14:15 +00:00
|
|
|
|
2004-11-03 13:51:07 +00:00
|
|
|
new scripts require
|
2012-07-28 06:14:15 +00:00
|
|
|
|
2004-11-03 13:51:07 +00:00
|
|
|
.nf
|
2008-06-05 12:26:22 +00:00
|
|
|
rm \-f nosuchfile \`find . \-name "*~"\`
|
2004-11-03 13:51:07 +00:00
|
|
|
.fi
|
2012-07-28 06:14:15 +00:00
|
|
|
|
2004-11-03 13:51:07 +00:00
|
|
|
to avoid error messages from
|
|
|
|
.I rm
|
|
|
|
called with an empty argument list.)
|
|
|
|
.SH NOTES
|
|
|
|
.SS Regular expressions
|
|
|
|
Note that wildcard patterns are not regular expressions,
|
2007-04-12 22:42:49 +00:00
|
|
|
although they are a bit similar.
|
|
|
|
First of all, they match
|
2004-11-03 13:51:07 +00:00
|
|
|
filenames, rather than text, and secondly, the conventions
|
2008-06-09 21:03:52 +00:00
|
|
|
are not the same: for example, in a regular expression \(aq*\(aq means zero or
|
2004-11-03 13:51:07 +00:00
|
|
|
more copies of the preceding thing.
|
|
|
|
|
|
|
|
Now that regular expressions have bracket expressions where
|
2008-06-09 21:03:52 +00:00
|
|
|
the negation is indicated by a \(aq^\(aq, POSIX has declared the
|
|
|
|
effect of a wildcard pattern "\fI[^...]\fP" to be undefined.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SS Character classes and Internationalization
|
|
|
|
Of course ranges were originally meant to be ASCII ranges,
|
2008-06-09 21:03:52 +00:00
|
|
|
so that "\fI[\ \-%]\fP" stands for "\fI[\ !"#$%]\fP" and "\fI[a\-z]\fP" stands
|
2004-11-03 13:51:07 +00:00
|
|
|
for "any lowercase letter".
|
intro.1, time.1, accept.2, bind.2, connect.2, execve.2, flock.2, getdents.2, getpriority.2, getuid.2, intro.2, ioctl.2, mincore.2, mknod.2, personality.2, ptrace.2, read.2, recv.2, select_tut.2, send.2, sendfile.2, shmctl.2, sigaction.2, signal.2, stat.2, times.2, truncate.2, umask.2, wait.2, MB_CUR_MAX.3, MB_LEN_MAX.3, argz_add.3, btowc.3, clearenv.3, clock.3, cmsg.3, end.3, endian.3, errno.3, exit.3, fgetwc.3, fgetws.3, fopen.3, fputwc.3, fputws.3, fseek.3, fwide.3, getfsent.3, getgrnam.3, gethostid.3, getipnodebyname.3, getmntent.3, getpwnam.3, getwchar.3, grantpt.3, iconv.3, iconv_close.3, iconv_open.3, insque.3, intro.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, malloc.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, mkstemp.3, mktemp.3, nl_langinfo.3, openpty.3, posix_openpt.3, printf.3, ptsname.3, putwchar.3, qecvt.3, rcmd.3, readdir.3, rexec.3, rpc.3, setnetgrent.3, shm_open.3, sigpause.3, stdin.3, stpcpy.3, strftime.3, strptime.3, syslog.3, towctrans.3, towlower.3, towupper.3, ttyslot.3, ungetwc.3, unlocked_stdio.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscasecmp.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcsdup.3, wcslen.3, wcsncasecmp.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcspbrk.3, wcsrchr.3, wcsrtombs.3, wcsspn.3, wcsstr.3, wcstok.3, wcstombs.3, wcswidth.3, wctob.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, wprintf.3, console_ioctl.4, pts.4, elf.5, filesystems.5, hosts.5, proc.5, ttytype.5, boot.7, capabilities.7, credentials.7, epoll.7, glob.7, koi8-r.7, path_resolution.7, pty.7, signal.7, suffixes.7, time.7, unicode.7, unix.7, uri.7, utf-8.7: global fix: s/Unix/UNIX/
The man pages were rather inconsistent in the use of "Unix"
versus "UNIX". Let's go with the trademark usage.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-10-12 04:45:38 +00:00
|
|
|
Some UNIX implementations generalized this so that a range X\-Y
|
2004-11-03 13:51:07 +00:00
|
|
|
stands for the set of characters with code between the codes for
|
2007-04-12 22:42:49 +00:00
|
|
|
X and for Y.
|
|
|
|
However, this requires the user to know the
|
2004-11-03 13:51:07 +00:00
|
|
|
character coding in use on the local system, and moreover, is
|
|
|
|
not convenient if the collating sequence for the local alphabet
|
|
|
|
differs from the ordering of the character codes.
|
|
|
|
Therefore, POSIX extended the bracket notation greatly,
|
|
|
|
both for wildcard patterns and for regular expressions.
|
|
|
|
In the above we saw three types of items that can occur in a bracket
|
|
|
|
expression: namely (i) the negation, (ii) explicit single characters,
|
2007-04-12 22:42:49 +00:00
|
|
|
and (iii) ranges.
|
|
|
|
POSIX specifies ranges in an internationally
|
2004-11-03 13:51:07 +00:00
|
|
|
more useful way and adds three more types:
|
|
|
|
|
2005-07-06 07:41:37 +00:00
|
|
|
(iii) Ranges X\-Y comprise all characters that fall between X
|
2005-06-24 14:17:21 +00:00
|
|
|
and Y (inclusive) in the current collating sequence as defined
|
2007-06-22 20:40:07 +00:00
|
|
|
by the
|
|
|
|
.B LC_COLLATE
|
|
|
|
category in the current locale.
|
2004-11-03 13:51:07 +00:00
|
|
|
|
|
|
|
(iv) Named character classes, like
|
|
|
|
.nf
|
2007-04-05 12:36:57 +00:00
|
|
|
|
2004-11-03 13:51:07 +00:00
|
|
|
[:alnum:] [:alpha:] [:blank:] [:cntrl:]
|
|
|
|
[:digit:] [:graph:] [:lower:] [:print:]
|
|
|
|
[:punct:] [:space:] [:upper:] [:xdigit:]
|
2007-04-05 12:36:57 +00:00
|
|
|
|
2004-11-03 13:51:07 +00:00
|
|
|
.fi
|
2008-06-09 21:03:52 +00:00
|
|
|
so that one can say "\fI[[:lower:]]\fP" instead of "\fI[a\-z]\fP", and have
|
|
|
|
things work in Denmark, too, where there are three letters past \(aqz\(aq
|
2004-11-03 13:51:07 +00:00
|
|
|
in the alphabet.
|
2007-06-22 18:25:23 +00:00
|
|
|
These character classes are defined by the
|
|
|
|
.B LC_CTYPE
|
|
|
|
category
|
2004-11-03 13:51:07 +00:00
|
|
|
in the current locale.
|
|
|
|
|
2008-06-09 21:03:52 +00:00
|
|
|
(v) Collating symbols, like "\fI[.ch.]\fP" or "\fI[.a-acute.]\fP",
|
|
|
|
where the string between "\fI[.\fP" and "\fI.]\fP" is a collating
|
2007-04-12 22:42:49 +00:00
|
|
|
element defined for the current locale.
|
|
|
|
Note that this may
|
getaddrinfo.3, setlocale.3, strchr.3, wctob.3, st.4, glob.7, locale.7, regex.7, standards.7, unicode.7, utf-8.7: Global fix: s/multi-/multi/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "multi-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 17:47:55 +00:00
|
|
|
be a multicharacter element.
|
2004-11-03 13:51:07 +00:00
|
|
|
|
2008-06-09 21:03:52 +00:00
|
|
|
(vi) Equivalence class expressions, like "\fI[=a=]\fP",
|
|
|
|
where the string between "\fI[=\fP" and "\fI=]\fP" is any collating
|
2004-11-03 13:51:07 +00:00
|
|
|
element from its equivalence class, as defined for the
|
2007-04-12 22:42:49 +00:00
|
|
|
current locale.
|
2008-06-09 21:03:52 +00:00
|
|
|
For example, "\fI[[=a=]]\fP" might be equivalent
|
2012-07-07 06:06:09 +00:00
|
|
|
to "\fI[a\('a\(`a\(:a\(^a]\fP", that is,
|
2008-06-09 21:03:52 +00:00
|
|
|
to "\fI[a[.a-acute.][.a-grave.][.a-umlaut.][.a-circumflex.]]\fP".
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR sh (1),
|
|
|
|
.BR fnmatch (3),
|
|
|
|
.BR glob (3),
|
|
|
|
.BR locale (7),
|
|
|
|
.BR regex (7)
|