.\" .\" %nmhwarning% .\" .TH AP %manext8% "%nmhdate%" MH.6.8 [%nmhversion%] .SH NAME ap \- parse addresses 822-style .SH SYNOPSIS .HP 5 .na .B %libdir%/ap .RB [ \-form .IR formatfile ] .RB [ \-normalize " | " \-nonormalize ] .RB [ \-Version ] .RB [ \-help ] .I addrs \&... .ad .SH DESCRIPTION .B Ap is a program that parses addresses according to the ARPA Internet standard. It also understands many non\-standard formats. It is useful for seeing how .B mmh will interpret an address. .PP The .B ap program treats each argument as one or more addresses, and prints those addresses out in the official 822\-format. Hence, it is usually best to enclose each argument in double\-quotes for the shell. .PP To override the output format used by .BR ap , the .B \-form .I file switch is used. This permits individual fields of the address to be extracted with ease. The .I file is either the name of a format file or it may be a format string directly, if prepended with an equal sign `='. See .BR mh\-format (5) for the details. .PP In addition to the standard escapes, .B ap also recognizes the following additional escape: .PP .RS 5 .nf .ta \w'Escape 'u +\w'Returns 'u .I "Escape Returns Description error string A diagnostic if the parse failed .RE .fi .PP If the .B \-normalize switch is given, .B ap will try to track down the official hostname of the address. .PP Here is the default format string used by .BR ap : .PP .RS 5 .nf %<{error}%{error}: %{text}%|%(putstr(proper{text}))%> .fi .RE .PP which says that if an error was detected, print the error, a `:', and the address in error. Otherwise, output the 822\-proper format of the address. .SH FILES .fc ^ ~ .nf .ta \w'%etcdir%/ExtraBigFileName 'u ^$HOME/.mmh/profile~^The user profile .fi .SH "PROFILE COMPONENTS" None .SH "SEE ALSO" dp(8), .I "Standard for the Format of ARPA Internet Text Messages" (RFC\-822) .SH DEFAULTS .nf .RB ` \-form "' defaults as described above" .RB ` \-normalize ' .fi .SH CONTEXT None