nmh-workers
[Top][All Lists]
Advanced

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

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


From: Ralph Corderoy
Subject: Re: [Nmh-workers] When a message goes only to me, as a cc
Date: Tue, 11 Oct 2016 19:00:34 +0100

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



reply via email to

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