|
NAMEfnmatch —
test whether a filename or pathname matches a shell-style
pattern
LIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <fnmatch.h>
int
DESCRIPTIONThefnmatch () function matches patterns according to the
rules used by the shell. It checks the string specified by the
string argument to see if it matches the pattern
specified by the pattern argument.
The flags argument modifies the
interpretation of pattern and
string. The value of flags is
the bitwise inclusive OR of any of the following constants, which are
defined in the include file
RETURN VALUESThefnmatch () function returns zero if
string matches the pattern specified by
pattern, otherwise, it returns the value
FNM_NOMATCH .
SEE ALSOsh(1), glob(3), regex(3)STANDARDSThe current implementation of thefnmatch () function
does not conform to IEEE Std 1003.2
(“POSIX.2”). Collating symbol expressions, equivalence
class expressions and character class expressions are not supported.
HISTORYThefnmatch () function first appeared in
4.4BSD.
BUGSThe pattern ‘* ’ matches the empty string,
even if FNM_PATHNAME is specified.
Visit the GSP FreeBSD Man Page Interface. |