Plan 9 from Bell Labs’s /usr/web/sources/plan9/mail/lib/mailnews

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


#!/bin/rc

home=/mail
files=`{news -n}
>$home/lib/newstime
switch($#files){
case 0
case *
	subscribers=`{cat /sys/lib/subscribers}
	for(i in $subscribers)
		touch /usr/$i/lib/newstime
	for(file in $files){
		switch($file){
		case news:
			;
		case *
			upasname=`{ls -m /lib/news/$file|sed 's/\[(.*)\]'.*/\1/}
			{
				echo 'subject: plan9 news: '^$file
				echo 'to: news-readers'
				echo
				news $file
			} | mail $subscribers
		}
	}
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.