plan9fox/rc/bin/ups

16 lines
461 B
Plaintext
Raw Normal View History

#!/bin/rc
# ups - look up a UPS tracking number
rfork en
if(! ~ $#* 1) {
echo usage: ups 1ZA41W190338680961 >[1=2]
exit usage
}
hget 'http://wwwapps.ups.com/WebTracking/processInputRequest?tracknum='^$1^ \
2013-08-07 01:36:11 +00:00
'&TypeOfInquiryNumber=T' |
htmlfmt |
awk '/^Share/,/^Subscribe/ {print;}' |
2013-08-07 01:38:56 +00:00
grep -v '^(Share|Change Delivery|Request Status Updates|Never track again|Continue|I am already a UPS My Choice Member|• What|Subscribe to UPS)' |
2013-08-07 01:36:11 +00:00
ssam 's/\n\n\n/\n/g'