aboutsummaryrefslogtreecommitdiff
path: root/bin/upas/spambox
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-05-21 18:39:29 +0000
committerrsc <devnull@localhost>2006-05-21 18:39:29 +0000
commitf1007ee0c6a2dfdc5512a1be3dada65cbc5d5391 (patch)
tree2a2b6aae68d2caa2d102fc2acc2d5f429dea02ce /bin/upas/spambox
parent38c7eb9bd22e05ef32998858b178edaf8269cbab (diff)
downloadplan9port-f1007ee0c6a2dfdc5512a1be3dada65cbc5d5391.tar.gz
plan9port-f1007ee0c6a2dfdc5512a1be3dada65cbc5d5391.tar.bz2
plan9port-f1007ee0c6a2dfdc5512a1be3dada65cbc5d5391.zip
new
Diffstat (limited to 'bin/upas/spambox')
-rwxr-xr-xbin/upas/spambox14
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/upas/spambox b/bin/upas/spambox
new file mode 100755
index 00000000..b34cd300
--- /dev/null
+++ b/bin/upas/spambox
@@ -0,0 +1,14 @@
+#!/usr/local/plan9/bin/rc
+
+if (~ $#* 0)
+ echo usage: spambox mailfs/mbox && exit "usage"
+box=$1
+msgs=(`{9p ls $box>[2=1]|awk '$10 ~ /[0-9][0-9]*/{print $10}'})
+if (~ $#msgs 0)
+ echo no messages in $box && exit "none"
+
+echo -n adding
+for (m in $msgs){
+ echo -n ' '$m
+ spam $box/$m
+}