


ELMALIAS(1L)      MISC. REFERENCE MANUAL PAGES       ELMALIAS(1L)



NAME
     elmalias - expand and display Elm address aliases

SYNOPSIS
     elmalias [ -adenrsuvV ] [ -f format ] [ name  ... ]

     $_l_i_b/prlong [ options ... ] < _f_i_l_e

DESCRIPTION
     _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 com-
     mand 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  command
     line  then  all alias values in the databases are displayed.
     All of these actions are default behaviors that may be modi-
     fied  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 -s and -u command line options (dis-
     cussed 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 -e com-
     mand line option (discussed shortly) fully expands out Group
     aliases.    The   default   output   produced  is  just  the
     ``Address'' information 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 main-
     tained 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:

     -a   Selects an alternative output  format.   The  ``Alias''



USENET Community TrustLast change: Elm Version 2.4                 1






ELMALIAS(1L)      MISC. REFERENCE MANUAL PAGES       ELMALIAS(1L)



          information  is  displayed in addition to and preceding
          the usual ``Address'' information.

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

     -e   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.

     -f   The output produced will be in  the  specified  _f_o_r_m_a_t.
          Format specifications will be discussed shortly.

     -n   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.

     -r   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.

     -s   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
          -u  option  is  also  specified the user-specific alias
          file will be ignored.

     -u   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  -s  option is also specified the system-wide alias
          file will be ignored.

     -v   Selects a verbose output format.   Both  the  ``Alias''
          and the ``Name'' information will be displayed in addi-
          tion to the  ``Address''  information.   The  ``Alias''
          information  will  precede the ``Address'' information,
          and  the  ``Name''  information  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.

     -V   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 -f 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  fol-
          lowing field descriptors may be used in _f_o_r_m_a_t specifi-
          cations:

               %a   Alias (the alias name)



USENET Community TrustLast change: Elm Version 2.4                 2






ELMALIAS(1L)      MISC. REFERENCE MANUAL PAGES       ELMALIAS(1L)



               %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 trun-
          cated to  twenty  characters.   The  following  special
          character  sequences  are  also  recognized  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
          mechanism  that  may  be used in format specifications.
          The conditional text should be surrounded  by  question
          marks, and a single character that specifies the condi-
          tion immediately follows the first question mark.   The
          condition  characters  correspond  to  the  ``%'' field
          specifier characters, 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  available,  you  may
          use  ``?n(%n)?'' in the format specification.  The com-
          mand line switches that select  an  alternative  format
          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,  fold-
          ing  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  stan-
          dard  input,  one line at a time, and tries to place as
          much information as possible on each  output  line.   A



USENET Community TrustLast change: Elm Version 2.4                 3






ELMALIAS(1L)      MISC. REFERENCE MANUAL PAGES       ELMALIAS(1L)



          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.

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

     -f _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.

     -1 _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.

     -l _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.

EXAMPLES
     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



USENET Community TrustLast change: Elm Version 2.4                 4






ELMALIAS(1L)      MISC. REFERENCE MANUAL PAGES       ELMALIAS(1L)



            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.

AUTHOR
     Elm Development Group

SEE ALSO
     checkalias(1L), elm(1L), listalias(1L), newalias(1L)

BUGS
     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  incon-
     sistency  please report it to us!  Boy, there sure are a lot
     of command line switches in this thing.  Note that the  pre-
     cedence  of  aliases  is  user  file then system 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 sys-
     tem alias file.

BUG REPORTS TO
     Syd Weinstein  elm@DSI.COM    (dsinc!elm)



USENET Community TrustLast change: Elm Version 2.4                 5






ELMALIAS(1L)      MISC. REFERENCE MANUAL PAGES       ELMALIAS(1L)



COPYRIGHTS
     Copyright 1993 by The USENET Community Trust





















































USENET Community TrustLast change: Elm Version 2.4                 6



