Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/rc/elise

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


#!/bin/rc
#
#	Lotus BBS query
#
bbs='http://www.british-cars.co.uk/cgi-bin/gen5?runprog=lotusbbs'
idx='&access=&mode=tlist&subject=2050'
art='&mode=thread&access=&subject=2050&source=T&thread='

if (~ $#* 0){
	hget $bbs^$idx |
	htmlfmt -a |
	sed '
		1,/^Time$/d
		/^Start a new thread$/,$d
	' |
	awk '
	BEGIN {i = 0}
	{
		p[i++] = $0;
		if (i == 6){
			id = p[1];
			gsub("\]", "", id); 
			gsub("^.*=", "", id);
			printf("elise %-22s # %-4s %s\n", id, p[3], p[0]);
			i = 0;
		}
	}
	'
}
if not{

	hget $bbs^$art^$1 |
	htmlfmt -l 80 |
	sed -n '
		1,/\| Advertisers \|/d
		/^If you would like to print this thread/,$d
		/^Thread: /{
			s/^Thread: //
			p
			d
		}
		/^Posted /{
			n
			/^$/d
			p
			d
			n
			d
		}
		s/^/	/p
	'

}

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].