STRGID(3ast) STRGID(3ast)

# [NAME](#NAME)

strgid - return group ID number for given group name

# [SYNOPSIS](#SYNOPSIS)

int strgid(const char* name)

# [DESCRIPTION](#DESCRIPTION)

*strgid* returns the group ID number for the given group name. *strgid* maintains an internal cache to avoid repeated password database scans by the low level [*getgrgid*(3)](/man/os/ksh/getgrgid.3). On the first error for a given name, *strgid* returns -1. Subsequent errors for the same name will result in *strgid* returning -2 instead.

# [SEE ALSO](#SEE_ALSO)

[getgrent(3)](/man/os/ksh/getgrent.3)

---

Document: strgid(3ast) from ksh 1.0.10-r36 (Chainguard OS)
Source: https://github.com/ksh93/ksh
