nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Maybe time for a new release?

2016-03-11 12:54:46
Norm wrote:

I want to output to stdout all the lines of that part that contain the
string "family".  What command go I feed into 'grep family"?

Well, it depends whether you want to modify the message on disk or not.

If you do want to modify the message permanently:

    $ mhfixmsg
    $ grep family `mhpath cur`

Some of us run mhfixmsg on our messages as we inc them, so we can then use 
grep, etc., directly.

If you don't want to modify the message:

    $ mhfixmsg -outfile - | grep family

-outfile can be abbreviated in usual MH fashion.

Those commands will output all the lines, in all parts, of the message.  You 
asked "of that part".  To just grep one or more specific parts, you could use 
mhstore, but that has nothing to do with (and precedes) mhfixmsg.

Suppose that I know that the current message in the current folder has a part 
which is either  utf-8 or a quotedPrintable and that

It doesn't matter whether you know that the message has UTF-8 content, or 
quotedPrintable or base64 encoding.  mhfixmsg won't decode or change the 
character set if it doesn't have to.

And it's safe to run mhfixmsg multiple times on a message.

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>