Previous: Defining Variables, Up: Your Variables [Contents][Index]
There are a few predefined variables. The fact that a2ps builds them
at startup changes nothing to their status: they can be modified like
any other variable using --define
(see Global Options).
In what follows, there are numbers (i) like this, or (ii) this. It
means that a2ps first tries the solution (i), if a result is obtained
(non empty value), this is the value given to the variable. Otherwise
it tries solution (ii), etc. The rationale behind the order is usually
from user modifiable values (e.g. environment variables) through
system’s hard coded values (e.g., calls to getpwuid
) and finally
arbitrary values.
Comments on the user. Computed by (i) the system’s database (the part
of pw_gecos
after the first ‘,’), (ii) not defined.
The user’s home directory. Determined by (i) the environment variable
HOME
, (ii) the system’s database (using getpwuid
), (iii)
the empty string.
The user’s host name. Assigned from (i) the system (gethostname
or uname
), (ii) the empty string.
The user’s login (e.g. ‘bgates’). Computed by (i) the environment
variable LOGNAME
, (ii) the environment variable USERNAME
,
(iii) the system’s database (using getpwuid
), (iv) the translated
string ‘user’.
The user’s name (e.g. ‘William Gates’). Computed by (i) the
system’s database (pw_gecos
up to the first ‘,’), (ii)
capitalized value of the variable ‘user.login’ unless it was the
translated string ‘user’, (iii) the translated string ‘Unknown
User’.