nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] When a message goes only to me, as a cc

2016-10-11 13:00:49
Hi Paul,

        tolap=$(whom $draft | grep ' at laptop\.org')
        fromfox=$(formail -c -x From: < $draft | egrep '@foxharp\.')
        if [ "$tolap" -a "$fromfox" ]

Not likely to be a problem here, but "x$tolap" protects from tolap
starting with a `-'.  But then each needs to become «"x$s" != x»,
which is a bit tedious.  [[...]] is much preferred if the shell you're
using has it.

I'm wrong.  This will always do the AND;  that's checked for first in
parsing.

    test -r -a -x

But if $tolap became `!' then

    test ! -a -x

would still change the intended behaviour.

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy

_______________________________________________
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>