tel 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. .TH TEL 1
  2. .SH NAME
  3. tel, ppq, iwhois \- look in phone book
  4. .SH SYNOPSIS
  5. .B tel
  6. .I key ...
  7. .PP
  8. .B p
  9. .RB [ -f ]
  10. .I value
  11. .PP
  12. .B ppq
  13. .RB [ -f ]
  14. .IR attribute = value
  15. .PP
  16. .B iwhois
  17. .IR name [ \fL@\f2domain ]
  18. .SH DESCRIPTION
  19. .I Tel
  20. looks up
  21. .I key
  22. in a private telephone book,
  23. .BR $home/lib/tel ,
  24. and in the public telephone book,
  25. .BR /lib/tel .
  26. It uses
  27. .IR grep
  28. (with the
  29. .B -i
  30. option to ignore case differences), so the key may be any part of a
  31. name or number. Customarily, the telephone book contains names,
  32. userids, home numbers, and office numbers of users. It also contains
  33. a directory of area codes and miscellaneous people of general
  34. interest.
  35. .PP
  36. .I Ppq
  37. looks up entries in the Lucent personnel database.
  38. Each search is against a single attribute. The
  39. possible search attributes are:
  40. .IP tel
  41. a telephone number.
  42. An entry matches if its telephone number ends in the
  43. digits given in
  44. .IR value .
  45. .IP name
  46. a proper name.
  47. .I Value
  48. must contain a family name, optionally prefixed
  49. with first and middle names or initials separated by '.'s.
  50. For example, emlin, grace.emlin, g.r.emlin can
  51. can be used to look up Grace Roosevelt Emlin.
  52. .IP org
  53. an organization name.
  54. .I Value
  55. can be any prefix string of an organization number.
  56. For example,
  57. .B bl011
  58. looks up everyone in research while
  59. .B bl011273
  60. looks up everyone in a single department.
  61. .IP id
  62. a post id.
  63. .I Value
  64. must exactly match the post id.
  65. .PP
  66. The attribute can be explicitly declared, e.g.
  67. .BR tel=5551212 ,
  68. or can be inferred from the form of the value using the following criteria:
  69. .IP 1)
  70. A
  71. .I value
  72. containing a '.' implies a name.
  73. .IP 2)
  74. Nothing but digits, '+', and '-' implies a telephone number.
  75. .IP 3)
  76. A mix of digits and letters implies an organization.
  77. .IP 4)
  78. Anything else implies two searches, first with the attribute
  79. .B id
  80. and if that fails, with attribute
  81. .BR name .
  82. .PP
  83. With no flags,
  84. .I ppq
  85. returns for each match a single line containing
  86. the employee's name, title, organization, location, room, telephone number,
  87. and email address.
  88. With
  89. .BR \-f ,
  90. .I ppq
  91. returns a fuller multiline entry for each match.
  92. .PP
  93. .I Iwhois
  94. looks up names in the Internet NIC's personnel database.
  95. .I Name
  96. should be a surname optionally followed by a comma and given name.
  97. A different server can be chosen by appending to the name an
  98. .B @
  99. followed by the server's domain name.
  100. .SH FILES
  101. .TF /lib/tel
  102. .TP
  103. .B /lib/tel
  104. Public telephone number database.
  105. .SH SOURCE
  106. .B /rc/bin/tel
  107. .br
  108. .B /rc/bin/iwhois
  109. .br
  110. .B /sys/src/cmd/ppq.c