fnmatch(3am)


NAME

   fnmatch - compare a string against a filename wildcard

SYNOPSIS

   @load "fnmatch"

   result = fnmatch(pattern, string, flags)

DESCRIPTION

   The  fnmatch  extension  provides  an  AWK  interface to the fnmatch(3)
   routine.  It adds a single function  named  fnmatch(),  one  predefined
   variable (FNM_NOMATCH), and an array of flag values named FNM.

   The first argument is the filename wildcard to match, the second is the
   filename string, and the third is either zero, or the bitwise OR of one
   or more of the flags in the FNM array.

   The  return value is zero on success, FNM_NOMATCH if the string did not
   match the pattern, or a different non-zero value if an error occurred.

   The flags are follows:

   FNM["CASEFOLD"]
          Corresponds to the FNM_CASEFOLD flag as defined in fnmatch(3).

   FNM["FILE_NAME"]
          Corresponds to the FNM_FILE_NAME flag as defined in fnmatch(3).

   FNM["LEADING_DIR"]
          Corresponds  to  the  FNM_LEADING_DIR   flag   as   defined   in
          fnmatch(3).

   FNM["NOESCAPE"]
          Corresponds to the FNM_NOESCAPE flag as defined in fnmatch(3).

   FNM["PATHNAME"]
          Corresponds to the FNM_PATHNAME flag as defined in fnmatch(3).

   FNM["PERIOD"]
          Corresponds to the FNM_PERIOD flag as defined in fnmatch(3).

NOTES

   Nothing  prevents  AWK  code  from  changing  the  predefined variabale
   FNM_NOMATCH, but doing so may cause strange results.

EXAMPLE

   @load "fnmatch"
   ...
   flags = or(FNM["PERIOD"], FNM["NOESCAPE"])
   if (fnmatch("*.a", "foo.c", flags) == FNM_NOMATCH)
        print "no match"

SEE ALSO

   GAWK:   Effective   AWK   Programming,    filefuncs(3am),    fork(3am),
   inplace(3am), ordchr(3am), readdir(3am), readfile(3am), revoutput(3am),
   rwarray(3am), time(3am).

   fnmatch(3).

AUTHOR

   Arnold Robbins, arnold@skeeve.com.

COPYING PERMISSIONS

   Copyright  2012, 2013, Free Software Foundation, Inc.

   Permission is granted to make and distribute verbatim  copies  of  this
   manual  page  provided  the copyright notice and this permission notice
   are preserved on all copies.

   Permission is granted to copy and distribute modified versions of  this
   manual  page  under  the conditions for verbatim copying, provided that
   the entire resulting derived work is distributed under the terms  of  a
   permission notice identical to this one.

   Permission  is  granted  to  copy  and  distribute translations of this
   manual page into another  language,  under  the  above  conditions  for
   modified  versions, except that this permission notice may be stated in
   a translation approved by the Foundation.


More Linux Commands

manpages/gnutls_x509_crt_get_pk_rsa_raw.3.html
gnutls_x509_crt_get_pk_rsa_raw(3) - API function (Man Page)
gnutls_x509_crt_get_pk_rsa_raw.3 - This function will export the RSA public keys parameters found in the given structure. The new parameters will be allocated u

manpages/fixproc.1.html
fixproc(1) - Fixes a process by performing the specified act
Fixes a process named proc by performing the specified action. The actions can be check, kill, restart, exist, or fix. The action is specified on the command li

manpages/getrpcent.3.html
getrpcent(3) - get RPC entry (Library - Linux man page).....
The getrpcent(), getrpcbyname(), and getrpcbynumber() functions each return a pointer to an object with the following structure containing the broken-out fields

manpages/du.1.html
du(1) - estimate file space usage - Linux manual page.......
Summarize disk usage of each FILE, recursively for directories. Mandatory arguments to long options are mandatory for short options too. -0, --null end each out

manpages/scr_set.3ncurses.html
scr_set(3ncurses) - read (write) a curses screen from (to) a
The scr_dump routine dumps the current contents of the virtual screen to the file filename. The scr_restore routine sets the virtual screen to the contents of f

manpages/fc-cache.1.html
fc-cache(1) - build font information cache files (Man Page)
fc-cache scans the font directories on the system and builds font information cache files for applications using fontconfig for their font handling. If director

manpages/XtErrorMsg.3.html
XtErrorMsg(3) - high-level error handlers - Linux man page
The XtErrorMsg function has been superceded by XtAppErrorMsg. The XtSetErrorMsgHandler function has been superceded by XtAppSetErrorMsgHandler. The XtSetWarning

manpages/mbstowcs.3.html
mbstowcs(3) - convert a multibyte string to a wide-character
If dest is not NULL, the mbstowcs() function converts the multibyte string src to a wide-character string starting at dest. At most n wide characters are writte

manpages/readers.conf.5.html
readers.conf(5) - Access control and configuration for nnrpd
readers.conf in pathetc specifies access control for nnrpd(8). It controls who is allowed to connect as a news reader and what theyre allowed to do after they c

manpages/XkbSAActionSetCtrls.3.html
XkbSAActionSetCtrls(3) - Sets the ctrls0 through ctrls3 fiel
XkbSAActionSetCtrls.3 - Actions associated with the XkbCtrlsAction structure change the state of the boolean controls. The type field can have any one of the va

manpages/sess_id.1ssl.html
sess_id(1ssl) SSL TLS session handling utility (Man Page)...
The sess_id process the encoded version of the SSL session structure and optionally prints out SSL session details (for example the SSL session master key) in h

manpages/attron.3ncurses.html
attron(3ncurses) - curses character and window attribute con
These routines manipulate the current attributes of the named window. The current attributes of a window apply to all characters that are written into the windo





We can't live, work or learn in freedom unless the software we use is free.