This section is based on catpages contributed by Mainichi Communications, Inc. Translated by: MYCOM team Converted by: Japanese Online Manual Project <man-jp@jp.FreeBSD.ORG> Submitted by: Kazuo Horikawa <k-horik@yk.rim.or.jp>
135 lines
4 KiB
Groff
135 lines
4 KiB
Groff
.\" Copyright (c) 1989, 1991, 1993
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" This code is derived from software contributed to Berkeley by
|
|
.\" Guido van Rossum.
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by the University of
|
|
.\" California, Berkeley and its contributors.
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" @(#)fnmatch.3 8.3 (Berkeley) 4/28/95
|
|
.\"
|
|
.Dd April 28, 1995
|
|
.Dt FNMATCH 3
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm fnmatch
|
|
.Nd ¥Õ¥¡¥¤¥ë̾¤«¥Ñ¥¹Ì¾¤ò¾È¹ç¤¹¤ë
|
|
.Sh ½ñ¼°
|
|
.Fd #include <fnmatch.h>
|
|
.Ft int
|
|
.Fn fnmatch "const char *pattern" "const char *string" "int flags"
|
|
.Sh ²òÀâ
|
|
.Fn fnmatch
|
|
´Ø¿ô¤Ï¡¢¥·¥§¥ë¤¬»ÈÍѤ¹¤ëµ¬Â§¤Ë½¾¤Ã¤Æ¥Ñ¥¿¡¼¥ó¤ò¾È¹ç¤·¤Þ¤¹¡£
|
|
.Fa string
|
|
°ú¿ô¤¬»ØÄꤹ¤ëʸ»úÎó¤ò¥Á¥§¥Ã¥¯¤·¡¢
|
|
.Fa pattern
|
|
°ú¿ô¤¬»ØÄꤹ¤ë¥Ñ¥¿¡¼¥ó¤È°ìÃפ¹¤ë¤«¤É¤¦¤«³Îǧ¤·¤Þ¤¹¡£
|
|
.Pp
|
|
.Fa flags
|
|
°ú¿ô¤Ï¡¢
|
|
.Fa pattern
|
|
¤È
|
|
.Fa string
|
|
¤Î²ò¼á¤ò½¤Àµ¤·¤Þ¤¹¡£
|
|
.Fa flags
|
|
¤ÎÃͤϡ¢°Ê²¼¤ÎÄê¿ô¤Î¥Ó¥Ã¥Èñ°Ì¤ÎÏÀÍýϤǤ¹¡£¤³¤ÎÄê¿ô¤Ï¡¢
|
|
¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë
|
|
.Pa fnmatch.h
|
|
¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
.Bl -tag -width FNM_PATHNAME
|
|
.It Dv FNM_NOESCAPE
|
|
Ä̾
|
|
.Fa pattern
|
|
¤ÎÃæ¤Ç¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å
|
|
.Pq Ql \e
|
|
¤Î¸å¤í¤Ë 1 ʸ»ú¤¬Â³¤¯¤â¤Î¤¬¸½¤ì¤ë¤´¤È¤Ë¡¢¤½¤ì¤Ï¤½¤Îʸ»ú¤Ç
|
|
ÃÖ¤´¹¤¨¤é¤ì¤Þ¤¹¡£¤³¤ÎÃÖ¤´¹¤¨¤Ï¡¢¤½¤Îʸ»ú¤ÎÆÃ¼ì¤Ê°ÕÌ£¤ò
|
|
̵¸ú¤Ë¤¹¤ë¤¿¤á¤Ë¼Â¹Ô¤µ¤ì¤Þ¤¹¡£
|
|
.Dv FNM_NOESCAPE
|
|
¥Õ¥é¥°¤òÀßÄꤹ¤ë¤È¡¢¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥åʸ»ú¤ÏÄ̾ïʸ»ú¤È¤·¤Æ°·¤ï¤ì¤Þ¤¹¡£
|
|
.It Dv FNM_PATHNAME
|
|
.Fa string
|
|
¤Î¥¹¥é¥Ã¥·¥åʸ»ú¤Ï¡¢
|
|
.Fa pattern
|
|
Ãæ¤Î¥¹¥é¥Ã¥·¥å¤È
|
|
ÌÀ³Î¤Ë°ìÃפ¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³¤Î¥Õ¥é¥°¤òÀßÄꤷ¤Ê¤¤¤È¡¢¥¹¥é¥Ã¥·¥å¤Ï
|
|
Ä̾ïʸ»ú¤È¤·¤Æ°·¤ï¤ì¤Þ¤¹¡£
|
|
.It Dv FNM_PERIOD
|
|
.Fa string
|
|
¤ÎºÇ½é¤Î¥Ô¥ê¥ª¥É¤Ï¡¢
|
|
.Fa pattern
|
|
Ãæ¤ÎºÇ½é¤Î¥Ô¥ê¥ª¥É¤È
|
|
ÌÀ³Î¤Ë°ìÃפ¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³¤Î¥Õ¥é¥°¤òÀßÄꤷ¤Ê¤¤¤È¡¢ºÇ½é¤Î¥Ô¥ê¥ª¥É¤Ï
|
|
Ä̾ïʸ»ú¤È¤·¤Æ°·¤ï¤ì¤Þ¤¹¡£¡ÖºÇ½é¤Î¡×¤È¤¤¤¦¸ÀÍÕ¤ÎÄêµÁ¤Ï¡¢
|
|
.Dv FNM_PATHNAME
|
|
¤Î»ØÄê¤Ë¤è¤Ã¤ÆÊѲ½¤·¤Þ¤¹¡£
|
|
.Ar string
|
|
¤ÎÂè 1 ¥¥ã¥é¥¯¥¿¤Ç¤¢¤ë¥Ô¥ê¥ª¥É¤Ï¡¢¾ï¤Ë¡ÖºÇ½é¤Î¡×¥Ô¥ê¥ª¥É¤Ç¤¹¡£
|
|
.Dv FNM_PATHNAME
|
|
¤òÀßÄꤷ¤¿¾ì¹ç¡¢¥¹¥é¥Ã¥·¥å¤Îľ¸å¤Î¥Ô¥ê¥ª¥É¤â¡ÖºÇ½é¤Î¡×¥Ô¥ê¥ª¥É¤Ç¤¹¡£
|
|
.It Dv FNM_LEADING_DIR
|
|
.Fa pattern
|
|
¤¬ÌäÂê¤Ê¤¯°ìÃפ·¤¿¸å¡¢»Ä¤ê¤Î
|
|
.Nm /*
|
|
¤ò̵»ë¤·¤Þ¤¹¡£
|
|
.It Dv FNM_CASEFOLD
|
|
.Fa pattern
|
|
¤È
|
|
.Fa string
|
|
¤ÎξÊý¤ÇÂçʸ»ú¤È¾®Ê¸»ú¤Î¶èÊ̤ò̵»ë¤·¤Þ¤¹¡£
|
|
.El
|
|
.Sh Ìá¤êÃÍ
|
|
.Fn fnmatch
|
|
´Ø¿ô¤Ï¡¢
|
|
.Fa pattern
|
|
¤¬»ØÄꤹ¤ë¥Ñ¥¿¡¼¥ó¤Ë
|
|
.Fa string
|
|
¤¬°ìÃפ¹¤ë¤È¥¼¥í¤òÌᤷ¤Þ¤¹¡£°ìÃפ·¤Ê¤¤¾ì¹ç¤ÏÃÍ
|
|
.Dv FNM_NOMATCH
|
|
¤òÌᤷ¤Þ¤¹¡£
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr sh 1 ,
|
|
.Xr glob 3 ,
|
|
.Xr regex 3
|
|
.Sh µ¬³Ê
|
|
.Fn fnmatch
|
|
´Ø¿ô¤Ï¡¢
|
|
.St -p1003.2
|
|
¤Ë½àµò¤·¤Æ¤¤¤Þ¤¹¡£
|
|
.Sh Îò»Ë
|
|
.Fn fnmatch
|
|
´Ø¿ô¤Ï¡¢
|
|
.Bx 4.4
|
|
¤ËÄɲ䵤ì¤Þ¤·¤¿¡£
|
|
.Sh ¥Ð¥°
|
|
.Dv FNM_PATHNAME
|
|
¤ò»ØÄꤷ¤Æ¤â¡¢¥Ñ¥¿¡¼¥ó
|
|
.Ql *
|
|
¤Ï¶õ¥¹¥È¥ê¥ó¥°¤È°ìÃפ·¤Þ¤¹¡£
|
|
.\"X kuma 1999-11-5
|