diff options
author | rsc <devnull@localhost> | 2006-05-21 18:39:29 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-05-21 18:39:29 +0000 |
commit | f1007ee0c6a2dfdc5512a1be3dada65cbc5d5391 (patch) | |
tree | 2a2b6aae68d2caa2d102fc2acc2d5f429dea02ce /bin/upas/spam | |
parent | 38c7eb9bd22e05ef32998858b178edaf8269cbab (diff) | |
download | plan9port-f1007ee0c6a2dfdc5512a1be3dada65cbc5d5391.tar.gz plan9port-f1007ee0c6a2dfdc5512a1be3dada65cbc5d5391.tar.bz2 plan9port-f1007ee0c6a2dfdc5512a1be3dada65cbc5d5391.zip |
new
Diffstat (limited to 'bin/upas/spam')
-rwxr-xr-x | bin/upas/spam | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/upas/spam b/bin/upas/spam new file mode 100755 index 00000000..d7d44852 --- /dev/null +++ b/bin/upas/spam @@ -0,0 +1,19 @@ +#!/usr/local/plan9/bin/rc + +rfork en + +if (~ $#* 0) + echo usage: spam mesg && exit 1 + +TMP=/tmp/spam.$USER.$pid +{ + echo '# hash table' + msgcat $1|sed '/^$/,$ s/^From / From /'|upas/msgtok| + grep -v '^....................(.*) '| + sed 's/$/ 1/' +} >$TMP.tok + +cd $home/mail +upas/addhash -o _prof.mbox _prof.mbox 1 $TMP.tok -1 +upas/addhash -o _prof.spam _prof.spam 1 $TMP.tok 1 +rm -f $TMP.* |