summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2017-11-02 04:34:04 -0400
committerJesse Luehrs <doy@tozt.net>2017-11-02 04:34:15 -0400
commitd4def2570ea0a52198eb2d3f83667d796dbd5c5a (patch)
tree60a96ab1987e58e77105eada655736a323c8601e /bin
parente43d87f5af82413117ad3ec42aec44a547d93e2a (diff)
downloadconf-d4def2570ea0a52198eb2d3f83667d796dbd5c5a.tar.gz
conf-d4def2570ea0a52198eb2d3f83667d796dbd5c5a.zip
handle path names with spaces
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 a3f4b3d..d8d1b25 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 -v '/spam/' | xargs -P1 -n1000 $SALEARN $OPTS --ham > $OUTFILE
+nice find $MAILDIR -type f | grep '/\(cur\|new\)/' | grep -v0 '/spam/' | xargs -P1 -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 '/spam/' | xargs -P1 -n1000 $SALEARN $OPTS --spam > $OUTFILE
+nice find $MAILDIR -type f | grep '/\(cur\|new\)/' | grep -0 '/spam/' | xargs -P1 -n1000 -0 $SALEARN $OPTS --spam > $OUTFILE
if [[ ! "$1" == "-q" ]]; then
echo -n "$(date): Syncing..."