27.3.1 Determining the effective user name

Function: mbfl_system_whoami
Function: mbfl_system_whoami_var _RV

Run the program whoami to determine the effective user name; print it on the standard output channel. If whoami is not executable or an error occurs executing it: return by calling return_failure().

We need to remember that a pathname to whoami is determined at package configuration time and hard–coded in the MBFL file; Gathering users data.

mbfl_system_whoami      -| marco

{
  mbfl_declare_varref(USERNAME)
  mbfl_system_whoami_var mbfl_datavar(USERNAME)
  "$USERNAME"
} ⇒ marco

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