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