gmatch man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

GMATCH(3GEN)							  GMATCH(3GEN)

NAME
       gmatch - shell global pattern matching

SYNOPSIS
       cc [ flag ... ] file ... -lgen [ library ... ]
       #include <libgen.h>

       int gmatch(const char *str, const char *pattern);

DESCRIPTION
       gmatch()	 checks	 whether  the  null-terminated	string str matches the
       null-terminated pattern string pattern. See  the	 sh(1),	 section  File
       Name  Generation, for a discussion of pattern matching. A backslash (\)
       is used as an escape character in pattern strings.

RETURN VALUES
       gmatch() returns non-zero if the pattern matches the  string,  zero  if
       the pattern does not.

EXAMPLES
       Example 1 Examples of gmatch() function.

       In  the	following  example,  gmatch()  returns non-zero (true) for all
       strings with "a" or "-" as their last character.

	 char *s;
	 gmatch (s, "*[a\-]" )

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌───────────────┬─────────────────┐
       │ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
       ├───────────────┼─────────────────┤
       │MT-Level       │ MT-Safe	 │
       └───────────────┴─────────────────┘

SEE ALSO
       sh(1), attributes(5)

NOTES
       When compiling multithreaded applications, the _REENTRANT flag must  be
       defined	on  the compile line.  This flag should only be used in multi‐
       threaded applications.

				 Dec 29, 1996			  GMATCH(3GEN)
[top]

List of man pages available for SmartOS

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]
Tweet
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