]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/wurl2txt
torrent(1): update url in examples section
[plan9front.git] / rc / bin / wurl2txt
1 #!/bin/rc
2
3 switch($#*){
4 case 0
5         exit
6 case 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
12 case *
13         for(i in *)
14                 wurl2txt $i
15 }