[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: David Levine
Subject: Re: [Nmh-workers] Maybe time for a new release?
Date: Fri, 11 Mar 2016 12:54:30 -0600

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]