1 | .\" |
---|
2 | .\" %nmhwarning% |
---|
3 | .\" $Id: ap.man,v 1.1.1.1 1999-02-07 18:14:19 danw Exp $ |
---|
4 | .\" |
---|
5 | .\" include the -mh macro file |
---|
6 | .so %etcdir%/tmac.h |
---|
7 | .\" |
---|
8 | .TH AP %manext8% MH.6.8 [%nmhversion%] |
---|
9 | .SH NAME |
---|
10 | ap \- parse addresses 822-style |
---|
11 | .SH SYNOPSIS |
---|
12 | .in +.5i |
---|
13 | .ti -.5i |
---|
14 | %libdir%/ap |
---|
15 | \%[\-form\ formatfile] |
---|
16 | .br |
---|
17 | \%[\-format\ string] |
---|
18 | \%[\-normalize] \%[\-nonormalize] |
---|
19 | .br |
---|
20 | \%[\-width\ columns] |
---|
21 | addrs\ ... |
---|
22 | .br |
---|
23 | \%[\-version] |
---|
24 | \%[\-help] |
---|
25 | .in -.5i |
---|
26 | .SH DESCRIPTION |
---|
27 | \fIAp\fR is a program that parses addresses according to the ARPA |
---|
28 | Internet standard. It also understands many non\-standard formats. |
---|
29 | It is useful for seeing how \fInmh\fR will interpret an address. |
---|
30 | |
---|
31 | The \fIap\fR program treats each argument as one or more addresses, and |
---|
32 | prints those addresses out in the official 822\-format. Hence, it is |
---|
33 | usually best to enclose each argument in double\-quotes for the shell. |
---|
34 | |
---|
35 | To override the output format used by \fIap\fR, the `\-format\ string' or |
---|
36 | `\-format\ file' switches are used. This permits individual fields of |
---|
37 | the address to be extracted with ease. The string is simply a format |
---|
38 | string, and the file is simply a format file. See \fImh\-format\fR\0(5) |
---|
39 | for the details. |
---|
40 | |
---|
41 | In addition to the standard escapes, |
---|
42 | \fIap\fR also recognizes the following additional escape: |
---|
43 | .sp 1 |
---|
44 | .nf |
---|
45 | .ta \w'Escape 'u +\w'Returns 'u |
---|
46 | \fIEscape\fR \fIReturns\fR \fIDescription\fR |
---|
47 | error string A diagnostic if the parse failed |
---|
48 | .re |
---|
49 | .fi |
---|
50 | |
---|
51 | If the `\-normalize' switch is given, \fIap\fR will try to track down |
---|
52 | the official hostname of the address. |
---|
53 | |
---|
54 | Here is the default format string used by \fIap\fR: |
---|
55 | |
---|
56 | .ti +.5i |
---|
57 | %<{error}%{error}: %{text}%|%(putstr(proper{text}))%> |
---|
58 | |
---|
59 | which says that if an error was detected, print the error, a `:', and |
---|
60 | the address in error. Otherwise, output the 822\-proper format of |
---|
61 | the address. |
---|
62 | .Fi |
---|
63 | ^$HOME/\&.mh\(ruprofile~^The user profile |
---|
64 | ^%etcdir%/mts.conf~^nmh mts configuration file |
---|
65 | .Pr |
---|
66 | None |
---|
67 | .Sa |
---|
68 | dp(8), |
---|
69 | .br |
---|
70 | \fIStandard for the Format of ARPA Internet Text Messages\fR (RFC\-822) |
---|
71 | .De |
---|
72 | `\-format' defaults as described above |
---|
73 | .Ds |
---|
74 | `\-normalize' |
---|
75 | .Ds |
---|
76 | `\-width' defaults to the width of the terminal |
---|
77 | .Co |
---|
78 | None |
---|
79 | .Bu |
---|
80 | The argument to the `\-format' switch must be interpreted as a single token |
---|
81 | by the shell that invokes \fIap\fR. |
---|
82 | Therefore, |
---|
83 | one must usually place the argument to this switch inside double\-quotes. |
---|
84 | .En |
---|