diff options
author | Jesse Luehrs <doy@tozt.net> | 2017-11-02 05:03:32 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2017-11-02 05:05:28 -0400 |
commit | 6e5a0bf09c2f6d76bcd6d2db309d7f516e8b62be (patch) | |
tree | d707a333c79a4bc1cf42d8e1e0d228a1bcbdd8f8 /bin | |
parent | 841e26973837fbf5e71bbefd8f1f5fa78fde63f1 (diff) | |
download | conf-6e5a0bf09c2f6d76bcd6d2db309d7f516e8b62be.tar.gz conf-6e5a0bf09c2f6d76bcd6d2db309d7f516e8b62be.zip |
actually make this script work again
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/learn_spam | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/learn_spam b/bin/learn_spam index 2dc8515..512aba9 100755 --- a/bin/learn_spam +++ b/bin/learn_spam @@ -15,12 +15,12 @@ fi if [[ ! "$1" == "-q" ]]; then echo -n "$(date): Learning ham..." fi -nice find $MAILDIR -type f | grep '/\(cur\|new\)/' | grep -v0 '/spam/' | xargs -P2 -0 $SALEARN $OPTS --ham > $OUTFILE +nice find $MAILDIR -type f | perl -nl0e'chomp; print if m{/(new|cur)/} && !m{/spam/}' | xargs -n1000 -0 $SALEARN $OPTS --ham > $OUTFILE if [[ ! "$1" == "-q" ]]; then echo -n "$(date): Learning spam..." fi -nice find $MAILDIR -type f | grep '/\(cur\|new\)/' | grep -0 '/spam/' | xargs -P2 -0 $SALEARN $OPTS --spam > $OUTFILE +nice find $MAILDIR -type f | perl -nl0e'chomp; print if m{/(new|cur)/} && m{/spam/}' | xargs -n1000 -0 $SALEARN $OPTS --spam > $OUTFILE if [[ ! "$1" == "-q" ]]; then echo -n "$(date): Syncing..." |