]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/ups
change listener from ip/imap4d to upas/imap4d
[plan9front.git] / rc / bin / ups
1 #!/bin/rc
2 # ups - look up a UPS tracking number
3 rfork en
4
5 if(! ~ $#* 1) {
6         echo usage: ups 1ZA41W190338680961 >[1=2]
7         exit usage
8 }
9
10 hget 'http://wwwapps.ups.com/WebTracking/processInputRequest?tracknum='^$1^ \
11         '&TypeOfInquiryNumber=T' |
12         htmlfmt |
13         awk '/^Share/,/^Subscribe/ {print;}' |
14         grep -v '^(Share|Change Delivery|Request Status Updates|Never track again|Continue|I am already a UPS My Choice Member|• What|Subscribe to UPS)' |
15         ssam 's/\n\n\n/\n/g'