Re: script question

From: Paul Lutus (nospam_at_nosite.zzz)
Date: 10/17/03


Date: Fri, 17 Oct 2003 00:36:22 -0700

Dan Pixley wrote:

> Hello all. I am trying to come up with a script that will do some email
> filtering for the Filters in Evolution (1.4). I'm using the option
> 'Pipe Message to Shell Command'. Here's my script:
>
> #!/bin/bash
>
> file=$1
> if grep '(\[200\.*\.*\.*' $file >& /dev/null
> then
> exit 0
> else
> exit 1
> fi
> ------------------------------------------------------
> This doesn't work quite right,

Really? Well, since you don't say what it is supposed to do, or what it
doesn't do, how can we help you?

> and am wondering how I properly pipe my
> email messages in Evolution to this script.

Start by saying what is required, and how your script fails in meeting this
requirement.

One immediately sees this in your (apparent) regex argument:

\.*\.*\.*

As constructed, it means zero or more periods, an argument repeated three
times. It's redundant. But is it a regex argument? If it is, use "egrep".

Conclusion: State the problem to be solved, not your solution.

-- 
Paul Lutus
http://www.arachnoid.com


Relevant Pages

  • script question
    ... I am trying to come up with a script that will do some email ... filtering for the Filters in Evolution. ... 'Pipe Message to Shell Command'. ...
    (linux.redhat)
  • Re: script question
    ... Dan Pixley wrote: ... I am trying to come up with a script that will do some email ... > filtering for the Filters in Evolution. ...
    (linux.redhat)
  • Re: script question
    ... > Dan Pixley wrote: ... I am trying to come up with a script that will do some ... >> email filtering for the Filters in Evolution. ... Yep, got that part, but its still not being procesed by the Evolution ...
    (linux.redhat)
  • Sylpheed-claws: importing Evolution address book ??
    ... I am trying to migrate from Evolution to Sylpheed-claws. ... Now the final touch consists of importing my Evolution address book! ... I did that, but then when I run the script, it fails to convert it. ... got exception, cleaning up the mess... ...
    (Ubuntu)
  • Various problems in Ternd Micro AppletTrap Script filtering
    ... Various problems in Ternd Micro AppletTrap Script filtering ... malicious JavaScript and unsecured ActiveX controls at the gateway. ...
    (Bugtraq)