procmail
[Top] [All Lists]

Re: Another question

1997-12-09 00:46:52
On Mon, 8 Dec 1997 09:48:49 +0200 (EET), I wrote on Procmail-L:
On Sat, 6 Dec 1997 16:25:47 -0700 (MST), William McClatchie
<wmcclatc(_at_)primenet(_dot_)com> wrote:
| ( sed -n /$REMOVE/d .address > $HOME/temp_file mv tempfile .address) ;
grep -v $SAFEREMOVE $HOME/temp_file > .address
        grep -v "$1" "$TMP" >"$2"

... and of course, the really good solution is to use neither sed nor
grep, but fgrep, which means you don't have to escape any
metacharacters, either. Many fgreps have an -x switch which prevents
partial matches, i.e. the match has to cover the whole line. 

fgrep -vx "$REMOVE" $HOME/temp_file > .address

/* era */

-- 
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>