gmatch(3gen) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

gmatch(3gen)

String Pattern-Matching Library Functions                         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(7) for descriptions of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ MT-LevelMT-Safe


SEE ALSO
       sh(1), attributes(7)



Oracle Solaris 11.4               14 May 2014                     gmatch(3GEN)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3