plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

spambox (282B)


      1 #!/usr/local/plan9/bin/rc
      2 
      3 if (~ $#* 0)
      4 	echo usage: spambox mailfs/mbox && exit "usage"
      5 box=$1
      6 msgs=(`{9p ls $box>[2=1]|awk '$10 ~ /[0-9][0-9]*/{print $10}'})
      7 if (~ $#msgs 0)
      8 	echo no messages in $box && exit "none"
      9 
     10 echo -n adding
     11 for (m in $msgs){
     12 	echo -n ' '$m
     13 	spam $box/$m
     14 }