summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-11-28 21:58:00 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-11-28 21:58:00 -0500
commita63b908b1f7fbc9560371c4a492759ed564a7e52 (patch)
tree1cc3f0b01e020c8913b25b204a60fb0f0e3dbf50
parente3ec7f6cd4204129184091a0343c49cefc4fa4b1 (diff)
have maildups print `done' when it's done generating the Message-ID table
-rw-r--r--maildups.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/maildups.sh b/maildups.sh
index c38467d..9c78bd6 100644
--- a/maildups.sh
+++ b/maildups.sh
@@ -3,11 +3,12 @@
maildir=$1
-echo 'Generating Message-ID table...'
+echo -n 'Generating Message-ID table... '
msgid_file=`mktemp`
grep -rH -m1 '^[Mm]essage-[Ii][Dd]:' "$maildir"| \
sed -r 's/(.*):[Mm]essage-[Ii][Dd]:\s*(\S.*)/\2:\1/'| \
sort -n>"$msgid_file"
+echo 'done'
< "$msgid_file" sed 's/:.*//'|uniq -d|while read msgid; do
echo "Removing dups of $msgid"