1
0

usps 326 B

1234567891011121314151617181920
  1. #!/bin/rc
  2. rfork en
  3. if(! ~ $#* 1) {
  4. echo usage: usps 01601531218002685498 >[1=2]
  5. exit usage
  6. }
  7. rfork e
  8. hget -p 'origTrackNum='^$1 http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do |
  9. htmlfmt > /tmp/usps.$pid
  10. sam -d /tmp/usps.$pid >[2] /dev/null <<'!'
  11. 0,/Label/-1d
  12. /^Enter Label/,$d
  13. ,p
  14. !
  15. rm /tmp/usps.$pid