]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/usps
newt: remove fn f, replace with walk
[plan9front.git] / rc / bin / usps
1 #!/bin/rc
2 rfork en
3
4
5 if(! ~ $#* 1) {
6         echo usage: usps 01601531218002685498 >[1=2]
7         exit usage
8 }
9
10 rfork e
11
12 hget -p 'qtc_tLabels1='^$1 https://tools.usps.com/go/TrackConfirmAction |
13         htmlfmt > /tmp/usps.$pid
14
15 sam -d /tmp/usps.$pid >[2] /dev/null <<'!'
16 ,/Tracking Number:/-1d
17 /Available Actions/,$d
18 ,p
19 !
20 rm /tmp/usps.$pid