ELMALIAS(1L)                                         ELMALIAS(1L)



NNAAMMEE
       elmalias - expand and display Elm address aliases

SSYYNNOOPPSSIISS
       eellmmaalliiaass [ --aaddeennrrssuuvvVV ] [ --ff format ] [ name  ... ]

       _$_l_i_b/pprrlloonngg [ options ... ] < _f_i_l_e

DDEESSCCRRIIPPTTIIOONN
       _E_l_m_a_l_i_a_s  allows you to examine information about aliases.
       The alias databases are consulted for  each  _n_a_m_e  on  the
       command  line, and the alias value is displayed, one value
       per line of output.  If _n_a_m_e is not a known alias, then it
       is  displayed  unchanged.  If no _n_a_m_e is given on the com-
       mand line then all alias values in the databases are  dis-
       played.   All  of these actions are default behaviors that
       may be modified by command line options.

       There are two possible alias  databases,  a  user-specific
       alias  file  (usually in _$_H_O_M_E_/_._e_l_m_/_a_l_i_a_s_e_s) and a system-
       wide alias file (usually  in  _$_l_i_b_/_a_l_i_a_s_e_s).   By  default
       both  files are searched, first the user-specific file and
       then the system-wide file.  If  an  alias  file  does  not
       exist  then _e_l_m_a_l_i_a_s silently ignores it and continues on.
       The --ss and --uu command line options (discussed shortly) can
       restrict what files are files searched.

       There  are  two types of aliases, Person aliases and Group
       aliases.  A Person alias expands to an individual  address
       and  a  Group  alias contains a list of addresses, some of
       which may be aliases.  By default, _e_l_m_a_l_i_a_s  displays  the
       defined  value  of  an  alias, regardless of type.  The --ee
       command line option (discussed shortly) fully expands  out
       Group aliases.

       The default output produced is just the ``Address'' infor-
       mation for each _n_a_m_e on the command  line.   A  number  of
       command  line  options  (discussed shortly) may be used to
       select different output information or specify a format of
       your choosing.  The following information is maintained in
       the alias databases, and may be accessed by  the  _e_l_m_a_l_i_a_s
       utility:

            +o Alias (the alias name)
            +o Last Name
            +o Name (the user's full name)
            +o Comment (not displayed in mail headers)
            +o Address (the alias value)
            +o Type (Person, Group, or Unknown)


       When the _n_a_m_e specified on the command line is not a known
       alias, both the ``Alias'' and ``Address'' information will
       display as the _n_a_m_e, the ``Type'' information will display
       as ``Unknown'', and all other items will be blank.

       The available command line options are:


       --aa     Selects  an   alternative   output   format.    The
              ``Alias''  information  is displayed in addition to
              and preceding the usual ``Address'' information.

       --dd     Turns debugging on. Has no effect  unless  _e_l_m_a_l_i_a_s
              was compiled with debugging enabled.

       --ee     Tells _e_l_m_a_l_i_a_s to fully expand group aliases.  This
              option can be used only when _n_a_m_es are given on the
              command line.

       --ff     The  output  produced will be in the specified _f_o_r_-
              _m_a_t.   Format  specifications  will  be   discussed
              shortly.

       --nn     Selects an alternative output format.  The ``Name''
              information, if it exists, is displayed in addition
              to and following the usual ``Address'' information.
              The ``Name'' will be enclosed in parenthesis.

       --rr     If a specified _n_a_m_e does not correspond to a  known
              alias then _e_l_m_a_l_i_a_s will display a message and exit
              with a nonzero status.

       --ss     Normally _e_l_m_a_l_i_a_s examines both  the  user-specific
              and  system-wide alias files.  This option requests
              that _e_l_m_a_l_i_a_s use the system-wide alias  file,  and
              unless  the  --uu  option is also specified the user-
              specific alias file will be ignored.

       --uu     Normally _e_l_m_a_l_i_a_s examines both  the  user-specific
              and  system-wide alias files.  This option requests
              that _e_l_m_a_l_i_a_s use the user-specific alias file, and
              unless  the --ss option is also specified the system-
              wide alias file will be ignored.

       --vv     Selects  a  verbose  output   format.    Both   the
              ``Alias'' and the ``Name'' information will be dis-
              played in addition to the ``Address''  information.
              The   ``Alias''   information   will   precede  the
              ``Address'' information, and the ``Name''  informa-
              tion will be enclosed in parenthesis and follow it.
              If there is no ``Name'' information for this  alias
              then that portion of the output will be ignored.

       --VV     Selects  a  very verbose, multi-line output format.
              Displays all available information on aliases.

       The output produced by _e_l_m_a_l_i_a_s is fully customizable with
       the --ff option.  The _f_o_r_m_a_t string uses a syntax similar to
       _d_a_t_e_(_1_) (System V version) and _p_r_i_n_t_f_(_3_).   The  following
       field descriptors may be used in _f_o_r_m_a_t specifications:

            %a   Alias (the alias name)
            %l   Last Name
            %n   Name (the user's full name)
            %c   Comment (not displayed in mail headers)
            %v   Address (the alias value)
            %t   Type (Person, Group, or Unknown)

       Field  widths  in  a  _[_-_]_[_m_]_[_._n_] format (again, similar to
       _p_r_i_n_t_f_(_3_)) may also  be  used.   For  example,  "%-20.20a"
       means  print the ``Alias'' information left justified in a
       field twenty characters long, with the value truncated  to
       twenty characters.

       The  following special character sequences are also recog-
       nized in format specifications:

            \b   A backspace.
            \f   A formfeed.
            \n   A newline.
            \r   A return.
            \t   A tab.
            \_c   Literal character ``_c''.

       There is a very simplistic conditional  evaluation  mecha-
       nism  that may be used in format specifications.  The con-
       ditional text should be surrounded by question marks,  and
       a  single  character  that specifies the condition immedi-
       ately follows the  first  question  mark.   The  condition
       characters correspond to the ``%'' field specifier charac-
       ters, and the condition is true if the corresponding alias
       information  is defined and nonempty.  For example, if you
       want to display the  ``Name''  information  surrounded  by
       parenthesis,  but omit it if the information is not avail-
       able, you may use ``?n(%n)?'' in the format specification.

       The  command line switches that select an alternative for-
       mat correspond to the following format specifiers.

            _d_e_f_a_u_l_t   "%v"
            -a   "%-20.20a %v"
            -n   "%v?n (%n)?"
            -v   "%-20.20a %v?n (%n)?"
            -V   "Alias:\t\t%a\n\
                   Address:\t%v\n\
                   Type:\t\t%t\n\
                 ?n  Name:\t\t%n\n?\
                 ?l  Last Name:\t%l\n?\
                 ?c  Comment:\t%c\n?"


       The _p_r_l_o_n_g utility formats long amounts of  data,  folding
       across multiple lines.  It is useful to reformat output of
       _e_l_m_a_l_i_a_s.  _P_r_l_o_n_g reads data from its standard input,  one
       line  at a time, and tries to place as much information as
       possible on each  output  line.   A  field  seperator,  by
       default a single space, seperates each input record in the
       output lines.  Every output line is preceded by  a  leader
       field.   By default the leader of the first output line is
       an empty string, and the leader for all subsequent  output
       lines  is  a single tab.  _p_r_l_o_n_g will never split an input
       record.  If an input record  exceeds  the  maximum  output
       line  length,  it will appear unmodified on an output line
       all by itself.

       The following options may be used  to  modify  the  _p_r_l_o_n_g
       behavior.

       --ww _w_i_d_t_h    Constrains  output  lines  to _w_i_d_t_h columns in
                   length (not counting an appended newline char-
                   acter).  The default is 78 columns.  The width
                   calculation assumes that tabstops occur  every
                   eight spaces.

       --ff _s_t_r_i_n_g   Seperates each input record with the indicated
                   _s_t_r_i_n_g when  displayed  to  the  output.   The
                   default is a single space.

       --11 _s_t_r_i_n_g   Specifies the leader _s_t_r_i_n_g used for the first
                   line of output.  (This  option  is  the  digit
                   ``one''.)  The default is an empty string.

       --ll _s_t_r_i_n_g   Specifies the leader _s_t_r_i_n_g for all subsequent
                   lines of output.  (This option is a lower-case
                   ``ell''.) The default is a single tab.

EEXXAAMMPPLLEESS
       Consider an _a_l_i_a_s_e_s_._t_e_x_t file that contains:

            friends = List of Friends = tom, dick, harry
            tom = Tom Smith = sleepy!tom
            dick = Dick Jones = dopey!dick
            harry = = grumpy!harry

       Below  are shown some example commands and the output pro-
       duced.

            $ _e_l_m_a_l_i_a_s _f_r_i_e_n_d_s
            tom,dick,harry
            $ _e_l_m_a_l_i_a_s _m_i_k_e
            mike
            $ _e_l_m_a_l_i_a_s _-_r _m_i_k_e
            elmalias: "mike" is not a known alias
            $ _e_l_m_a_l_i_a_s _-_n _f_r_i_e_n_d_s
            tom,dick,harry (List of Friends)
            $ _e_l_m_a_l_i_a_s _-_a _f_r_i_e_n_d_s
            friends              tom,dick,harry
            $ _e_l_m_a_l_i_a_s _-_V _f_r_i_e_n_d_s
            Alias:          friends
              Address:      tom,dick,harry
              Type:         Group
              Name:         List of Friends
              Last Name:    List of Friends
            $ _e_l_m_a_l_i_a_s _-_e _f_r_i_e_n_d_s
            tom@sleepy.acme.com
            dick@dopey.acme.com
            harry@grumpy.acme.com
            $ _e_l_m_a_l_i_a_s _-_v_e _f_r_i_e_n_d_s
            tom                  tom@sleepy.acme.com (Tom Smith)
            dick                 dick@dopey.acme.com (Dick Jones)
            harry                harry@grumpy.acme.com
            $ _e_l_m_a_l_i_a_s _-_f _"_a_l_i_a_s _%_a _i_s _\_"_%_v_\_" _?_n_(_%_n_)_?_" _-_e _f_r_i_e_n_d_s
            alias tom is "tom@sleepy.acme.com" (Tom Smith)
            alias dick is "dick@dopey.acme.com" (Dick Jones)
            alias harry is "harry@grumpy.acme.com"
            $ _e_l_m_a_l_i_a_s _-_e_n _f_r_i_e_n_d_s _| _/_u_s_r_/_l_i_b_/_e_l_m_/_p_r_l_o_n_g _-_w_4_0
            tom@sleepy.acme.com (Tom Smith)
                    dick@dopey.acme.com (Dick Jones)
                    harry@grumpy.acme.com
            $ _e_l_m_a_l_i_a_s _-_e_n _f_r_i_e_n_d_s _| _/_u_s_r_/_l_i_b_/_e_l_m_/_p_r_l_o_n_g _-_1 _"_T_o_: _" _-_f _"_, _" _-_w_4_0
            To: tom@sleepy.acme.com (Tom Smith),
                    dick@dopey.acme.com (Dick Jones),
                    harry@grumpy.acme.com


The _c_h_e_c_k_a_l_i_a_s(1L) and _l_i_s_t_a_l_i_a_s(1L) scripts distributed with the
Elm  package  provide further examples of the _e_l_m_a_l_i_a_s and _p_r_l_o_n_g
utilities.

AAUUTTHHOORR
       Elm Development Group

SSEEEE AALLSSOO
       checkalias(1L), elm(1L), listalias(1L), newalias(1L)

BBUUGGSS
       There is no centralized, comprehensive  interface  to  the
       Elm  2.4  alias  system, so every program in the Elm suite
       that uses aliases implements  its  own  interfaces.   It's
       possible  for  inconsistencies  to  creep  in between what
       _e_l_m_a_l_i_a_s says and what some Elm utility does.  If you find
       an inconsistency please report it to us!

       Boy, there sure are a lot of command line switches in this
       thing.

       Note that the precedence of aliases is user file then sys-
       tem  file.  This means that a user can 'overload' an alias
       by having one defined in the system file also  defined  in
       theirs.   This  shouldn't turn out to be a problem, but is
       something for the system administrator  to  keep  in  mind
       when creating the system alias file.

BBUUGG RREEPPOORRTTSS TTOO
       Bill Pemberton  flash@virginia.edu

CCOOPPYYRRIIGGHHTTSS
       Copyright 1993-1995 by The USENET Community Trust



USENET Community Trust   Elm Version 2.5             ELMALIAS(1L)
