newsbody(1)

πŸ’– NAME πŸ’–

newsbody β€” run a program on the body of a mail or news message. that's it, that's the whole vibe bestie 🫢


✨ SYNOPSIS ✨

newsbody [-fhqsv] [-k headername ] -n message -p program [-- [ arguments...  ]]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea. newsbody takes the body of a news or email article (that's your message) and copies it into a temporary file β€” we're calling that the bodyfile, iconic name, no notes β€” and then it calls program with its arguments. program is supposed to change the bodyfile somehow. like, it can be a spell checker, that's literally the classic example. then afterwards, the possibly-changed body gets remerged with the headers and copied back into the message. slay. ✨

if message is given as - then newsbody acts as a filter, meaning standard input and standard output get used instead. lowkey elegant. πŸ’…

and listen β€” %f in the arguments expands to the name of the bodyfile, or to - if you're using the -f option. use %% if you want an actual, real, literal % character. yes queen, escape it. 😌


πŸŽ€ OPTIONS πŸŽ€

  • -f β€” the called program is a filter, so no temporary file. instead the body gets piped to its standard input and read back from its standard output. it's giving pipe energy 🧚
  • -h β€” keep the entire header. you can also use this flag if newsfile doesn't have a header at all. protecting the header like it's your emotional support 🫢
  • -q β€” also remove quotes before filtering the body. lines starting with > count as quotes. bye bye reply chains πŸ‘‹
  • -s β€” also remove the signature before filtering the body. sorry to the sign-off, you're not invited to this party 😭
  • -k headername β€” keep these header lines in the bodyfile. multiple -k flags are allowed, so stack 'em, collect 'em, go feral ✨
  • -v β€” print the version and exit. short, sweet, done. πŸ’…

πŸ“ FILES πŸ“

newsbody uses one or two temporary files, with names given by the mkstemp(3) or the tmpnam(3) function. temp files stay winning πŸ’œ


πŸ’€ BUGS πŸ’€

if some system call gives an unexpected error, newsbody will stop immediately with an error message β€” and it leaves its temporary files behind. πŸ’€ so yeah, not great, not terrible, but def not great. bestie just left the mess there fr fr.


πŸ‘‘ AUTHOR πŸ‘‘

by Byrial Jensen <byrial@image.dk> β€” actual legend, we stan πŸ‘‘


🌈 SEE ALSO 🌈

pospell(1) β€” go read it, iykyk πŸ’–


and that's a wrap on this page from the Unix manual, dated APRIL 2000 β€” yes, the year, and it's still out here serving πŸ’…πŸŒΈ thanks for coming to my ted talk, mwah πŸŽ€