nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] mhfixmsg invocation

2014-11-19 10:36:27
Paul F. wrote:

david wrote:

 > Alternatively, something like this (completely untested)?
 >
 >     msgs=`inc -format '%(msg)'`  &&  [ -n "$msgs" ]  &&  mhfixmsg $msgs

but then i'd lose the default output of inc.

msgs=`inc -format '%(msg)'`  &&  [ -n "$msgs" ]  &&  scan $msgs  &&  mhfixmsg 
$msgs

inc and scan use the same code for their output.

does mhfixmsg report (via exit code) whether it actually did anything
or not?  the man page doesn't say.  if not, using anno would be
difficult.

No, it only returns a nonzero status if it found a problem.
I'm still not convinced; if I was going to add the header,
I'd do it whether or not mhfixmsg modified the message.  If
you want to see if it did modify it, you could run with
-verbose.  (And either filter out the "will not decode"
messages, which should go away some day, or grep for the
messages you're interested in.)

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>