xref: /plan9/rc/bin/wurl2txt (revision 9a747e4fd48b9f4522c70c07e8f882a15030f964)
1#!/bin/rc
2
3switch($#*){
4case 0
5	exit
6case 1
7	name = /`{echo $1 | sed 's;.*//;;
8		s;/.*;;'}^/webpage
9	# send hget errors to 2 so they appear in window
10	hget $1 >[2=1]| {echo $1; echo; htmlfmt} >[2=1] | plumb -i -d edit -a 'action=showdata filename='$name
11	exit
12case *
13	for(i in *)
14		wurl2txt $i
15}
16