27.2.3 Searching entries from /etc/group

We are meant to call these function after a call to mbfl_system_group_read(). The following functions inspect entries from /etc/group and locate them using numeric indexes; such indexes are valid only until the next call to mbfl_system_group_reset().

Function: mbfl_system_group_find_entry_by_name NAME
Function: mbfl_system_group_find_entry_by_name_var _RV NAME

Search the entries of /etc/group for one whose group name is NAME. When successful: print to stdout the index of the entry and return true; otherwise return false. We can use the index with the functions described in Inspecting entries from /etc/group.

The function variant _var stores the result in the variable _RV, rather than print it; Result variables.

Function: mbfl_system_group_find_entry_by_gid GID
Function: mbfl_system_group_find_entry_by_gid_var _RV GID

Search the entries of /etc/group for one whose group id is GID. When successful: print to stdout the index of the entry and return true; otherwise return false. We can use the index with the functions described in Inspecting entries from /etc/group.

The function variant _var stores the result in the variable _RV, rather than print it; Result variables.


This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.