AP(8)

πŸ’– AP(8) β€” the address-parsing bestie πŸ’–

ok so this is the manual page for ap from the nmh suite, living in the System Manager's Manual section 8. she's a parser of RFC 822-style addresses and honestly? she eats. πŸ’…


✨ NAME ✨

ap β€” nmh's parser of RFC 822-style addresses πŸŽ€


🌸 SYNOPSIS 🌸

/usr/libexec/nmh/ap [-help] [-version] [-form formatfile] [-format
     string] [-width columns] addrs ...

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so ap is a program that parses addresses according to the ARPA Internet standard. no cap. and bestie, she also understands many non-standard formats, which is genuinely so iconic of her. she's useful for seeing how nmh will interpret an address β€” like a little vibe check for your addresses. πŸ”₯

the ap program treats each argument as one or more addresses, and prints those addresses out in the official RFC 822 format. so like, it is usually best to enclose each argument in quotes for the shell. protect her from the shell bestie, she deserves it 🫢

to override the output format that ap uses, you reach for the -format string switch or the -format file switch. this permits individual fields of the address to be extracted with ease ✨. the string is simply a format string, and the file is simply a format file. see mh-format(5) for the details, iykyk.


πŸŽ€ the bonus escape πŸŽ€

in addition to the standard escapes, ap also recognizes the following additional escape:

  • error β€” returns a string: a diagnostic if the parse failed 😭

πŸ’œ the default format string πŸ’œ

here is the default format string that ap uses:

%<{error}%{error}: %{text}%|%(putstr(proper{text}))%>

which says that if an error was detected, print the error, a ':', and the address in error. otherwise, output the RFC 822-proper format of the address. periodt. πŸ‘‘


πŸ“ FILES πŸ“

  • $HOME/.mh_profile β€” the user's profile. πŸ’–
  • /etc/nmh/mts.conf β€” the mts configuration file. πŸ’–

🌈 PROFILE COMPONENTS 🌈

None

like, literally none. nothing. empty. the void. πŸ’€


⭐ SEE ALSO ⭐


πŸ‘‘ DEFAULTS πŸ‘‘

  • -format β€” as described above. πŸ’«
  • -width β€” the width of the terminal. πŸ“

🧚 CONTEXT 🧚

None

(again, nothing! she's low maintenance bestie 🫢)


cute sign-off: this whole thing is from nmh-1.8, dated 2013-12-05, and it lives in section AP(8) of the System Manager's Manual. slay, go parse some addresses, mwah πŸ’…βœ¨πŸŽ€
πŸ“¦ where this page comes from