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.
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
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.
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.
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.
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.
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.
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.
This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.