fnmatch man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

fnmatch(3C)							   fnmatch(3C)

       fnmatch() - match filename patterns

       performs	 pattern  matching as described in regexp(5) under By default,
       the rule qualifications for filename  expansion	do  not	 apply;	 i.e.,
       periods	(dots)	and  slashes are matched as ordinary characters.  This
       default behavior can be modified by using the flags described below.

       The flag argument modifies the interpretation of	 pattern  and  string.
       If which is defined in is set in flag, a slash character in string must
       be explicitly matched by a slash in pattern; it cannot  be  matched  by
       either the asterisk or question mark special characters or by a bracket

       If is set in flag, a leading period must	 be  explicitly	 matched.   It
       will not be matched by a bracket expression, question mark or asterisk.
       By default, a period is leading if it is the first character in string.
       If  is set in flag, a period is leading if it is the first character in
       string or immediately follows a slash.

       If is not set in flag, a backslash character in pattern followed by any
       other  character	 matches that second character in string.  In particu‐
       lar, matches a backslash in string.  If is set, a  backslash  character
       is treated as an ordinary character.

       If flag is zero, the slash character and the period are treated as reg‐
       ular characters.	 If flag has any other value, the result is undefined.

       If string matches the pattern specified by pattern, returns zero.  Oth‐
       erwise, returns non-zero.

       The  following  excerpt	uses to check each file in a directory against
       the pattern

	      pattern = "*.c";
	      while(dp = readdir(dirp)){
		  if((fnmatch(pattern, dp->d_name,0)) == 0){
		      /* do processing for match */

       was developed by OSF and HP.

       sh(1), glob(3C), thread_safety(5).


List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net