Plan 9 from Bell Labs’s /usr/web/sources/contrib/nemo/root/sys/src/cmd/mail2fs/Month

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
rfork e
cd /mail/box/$user/msgs
oldones=`{ls -d [21][09]???[0-9] | sort -r | tail +2}
for(m in $oldones){
	if(test -e $m/[ds].*)
		echo 'for (f in '^$m^'/[ds].*) { rm -r $f }'
	test -e $m.l* || {
		echo msgs -a /mail/box/$user/msgs $m
		msgs -a /mail/box/$user/msgs $m > $m.l
	}
}
for(tag in 9fans gsyc inferno sp9sss){
	echo $tag
	grep -hi $tag *.l* >$tag
}


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].