Next: , Previous: , Up: system passwd   [Contents][Index]


19.1.4 Inspecting entries from passwd

The following functions inspect entries from /etc/passwd using an index argument; we must obtain indexes with the functions described in Searching entries from passwd.

Function: mbfl_system_passwd_get_name idx
Function: mbfl_system_passwd_get_name_var _RV idx

Print to stdout the field name of the passwd entry at index idx.

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

local IDX NAME

mbfl_system_passwd_read
if mbfl_system_passwd_find_entry_by_name_var IDX root
then
    if mbfl_system_passwd_get_name_var NAME $IDX
    then echo "$NAME"
    fi
fi
Function: mbfl_system_passwd_get_passwd idx
Function: mbfl_system_passwd_get_passwd_var _RV idx

Print to stdout the field passwd of the passwd entry at index idx.

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

Function: mbfl_system_passwd_get_uid idx
Function: mbfl_system_passwd_get_uid_var _RV idx

Print to stdout the field uid of the passwd entry at index idx.

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

Function: mbfl_system_passwd_get_gid idx
Function: mbfl_system_passwd_get_gid_var _RV idx

Print to stdout the field gid of the passwd entry at index idx.

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

Function: mbfl_system_passwd_get_gecos idx
Function: mbfl_system_passwd_get_gecos_var _RV idx

Print to stdout the field gecos of the passwd entry at index idx.

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

Function: mbfl_system_passwd_get_dir idx
Function: mbfl_system_passwd_get_dir_var _RV idx

Print to stdout the field dir of the passwd entry at index idx.

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

Function: mbfl_system_passwd_get_shell idx
Function: mbfl_system_passwd_get_shell_var _RV idx

Print to stdout the field shell of the passwd entry at index idx.

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


Next: , Previous: , Up: system passwd   [Contents][Index]

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