aboutsummaryrefslogtreecommitdiff
path: root/bin/upas/spambox
blob: 390cc724e24c7b686363a34a28c257a8e3bb483a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/Users/ethan/plan9port/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
}