TEL(1)                                                     TEL(1)

     NAME
          tel, pq, iwhois - look in phone book

     SYNOPSIS
          tel key ...

          pq [-f] value

          pq [-f] attribute=value

          iwhois name[@domain]

     DESCRIPTION
          Tel looks up key in a private telephone book, $home/lib/tel,
          and in the public telephone book, /lib/tel.  It uses grep
          (with the -i option to ignore case differences), so the key
          may be any part of a name or number.  Customarily, the tele-
          phone book contains names, userids, home numbers, and office
          numbers of users.  It also contains a directory of area
          codes and miscellaneous people of general interest.

          Pq looks up entries in the Lucent personnel database.  Each
          search is against a single attribute.  The possible search
          attributes are:

          tel  a telephone number. An entry matches if its telephone
               number ends in the digits given in value.

          name a proper name.  Value must contain a family name,
               optionally prefixed with first and middle names or ini-
               tials separated by '.'s.  For example, emlin,
               grace.emlin, g.r.emlin can can be used to look up Grace
               Roosevelt Emlin.

          org  an organization name.  Value can be any prefix string
               of an organization number.  For example, bl011 looks up
               everyone in research while bl011273 looks up everyone
               in a single department.

          id   a post id.  Value must exactly match the post id.

          The attribute can be explicitly declared, e.g.  tel=5551212,
          or can be inferred from the form of the value using the fol-
          lowing criteria:

          1)   A value containing a '.' implies a name.

          2)   Nothing but digits, '+', and '-' implies a telephone
               number.

     Page 1                       Plan 9             (printed 4/23/24)

     TEL(1)                                                     TEL(1)

          3)   A mix of digits and letters implies an organization.

          4)   Anything else implies two searches, first with the
               attribute id and if that fails, with attribute name.

          With no flags, pq returns for each match a single line con-
          taining the employee's name, title, organization, location,
          room, telephone number, and email address.  With -f, pq
          returns a fuller multiline entry for each match.

          Iwhois looks up names in the Internet NIC's personnel data-
          base.  Name should be a surname optionally followed by a
          comma and given name.  A different server can be chosen by
          appending to the name an @ followed by the server's domain
          name.

     FILES
          /lib/tel  Public telephone number database.

     SOURCE
          /rc/bin/tel
          /rc/bin/iwhois

     Page 2                       Plan 9             (printed 4/23/24)