On Tue, Nov 07, 2000 at 02:46:40PM -0600, David Champion wrote:
[snip original discussion of word/character counting]
> However, I can imagine a pattern expression that pipes each message
> through a command, and matches based on that command's exit status: if
> 0, match; else, no match.  This could work like:
>       ~Z 'set -- `wc %s`; [ $2 -gt 1000 ] && true || false'

Just as a side note - the '&& true || false' part is redundant - the shell
evaluates && and || based purely on the last command's exit status;
so the '&& true || false' expression is only useful for turning
a "zero / non-zero" exit code into a "zero / one".  In this particular
case, the last command is '[' a.k.a. 'test' - which in all its incarnations
I've seen so far returns zero or one.

G'luck,
Peter

-- 
What would this sentence be like if pi were 3?

Reply via email to