shithub: rc

ref: 51d90b621f61c838b10b5d49598b6668559e3c2e
dir: /mlchmod/

View raw version
#!/bin/rc
# chmod mailing list messages so they can be read by remote 9p users.
rfork en
if(! test -f /mail/box/$1/index)
	>/mail/box/$1/index
chmod +t /mail/box/$1/index
if(! test -d /mail/box/$1/mbox)
	exit
builtin cd /mail/box/$1/mbox
for(i in `{ls -l  | grep -v 'rw-rw-r' | awk '{print $10}'}){
	echo $i
	chmod +r $i
}