gmatch(3G) gmatch(3G)
gmatch - shell global pattern matching
cc [flag <b>...] file ... -lgen [library <b>...]
#include <libgen.h>
int gmatch (const char *str, const char *pattern);
gmatch checks whether the null-terminated string str matches the nullterminated
pattern string pattern. See the sh(1) section ``File Name
Generation'' for a discussion of pattern matching. gmatch returns nonzero
if the pattern matches the string, zero if the pattern doesn't. A
backslash (`\') is used as an escape character in pattern strings.
char *s;
gmatch (s, "*[a\-]" )
gmatch returns non-zero (true) for all strings with `a' or `-' as their
last character.
sh(1)
PPPPaaaaggggeeee 1111 [ Back ]
|