summaryrefslogtreecommitdiff
path: root/rc/bin/wurl2txt
blob: 19dad7b6f4e11b08dbe099f864f0fd0d00c5368e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/rc

switch($#*){
case 0
	exit
case 1
	name = /`{echo $1 | sed 's;.*//;;
		s;/.*;;'}^/webpage
	# send hget errors to 2 so they appear in window
	hget $1 >[2=1]| {echo $1; echo; htmlfmt} >[2=1] | plumb -i -d edit -a 'action=showdata filename='$name
	exit
case *
	for(i in *)
		wurl2txt $i
}