FNMATCH(3) 1990 FNMATCH(3) NNAAMMEE fnmatch - match filename or pathname SSYYNNOOPPSSIISS #include <unistd.h> int fnmatch(const char *pattern, const char *string, int flags); DDEESSCCRRIIPPTTIIOONN _F_n_m_a_t_c_h matches patterns according to the rules used by the shell. It checks the string specified by the _s_t_r_i_n_g argu- ment to see if it matches the pattern specified by the _p_a_t_- _t_e_r_n argument. The _f_l_a_g_s argument modifies the interpretation of _p_a_t_t_e_r_n and _s_t_r_i_n_g. The value of _f_l_a_g_s is the bitwise inclusive OR of any of the following constants, which are defined in the include file _u_n_i_s_t_d._h. FNM_PATHNAME Slash characters in _s_t_r_i_n_g must be explicitly matched by slashes in _p_a_t_t_e_r_n. If this flag is not set, then slashes are treated as regular characters. FNM_QUOTE Every occurrence of a backslash (``\'') followed by a character in _p_a_t_t_e_r_n is replaced by that character. This is done to negate any special meaning for the character. RREETTUURRNNSS If _s_t_r_i_n_g matches the pattern specified by _p_a_t_t_e_r_n, then _f_n_m_a_t_c_h returns zero. Otherwise, _f_n_m_a_t_c_h returns nonzero. SSEEEE AALLSSOO sh(1), glob(3), wordexp(3), regexp(3) BBUUGGSS Quotes and slashes in range patterns are not handled correctly. The pattern ``*'' matches the empty string, even if _F_N_M__P_A_T_H_N_A_M_E is specified. Printed 7/27/90 June 1