summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2017-11-02 05:03:32 -0400
committerJesse Luehrs <doy@tozt.net>2017-11-02 05:05:28 -0400
commit6e5a0bf09c2f6d76bcd6d2db309d7f516e8b62be (patch)
treed707a333c79a4bc1cf42d8e1e0d228a1bcbdd8f8 /bin
parent841e26973837fbf5e71bbefd8f1f5fa78fde63f1 (diff)
downloadconf-6e5a0bf09c2f6d76bcd6d2db309d7f516e8b62be.tar.gz
conf-6e5a0bf09c2f6d76bcd6d2db309d7f516e8b62be.zip
actually make this script work again
Diffstat (limited to 'bin')
-rwxr-xr-xbin/learn_spam4
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..."