plan9fox/rc/bin/usps

21 lines
320 B
Text
Raw Normal View History

#!/bin/rc
rfork en
if(! ~ $#* 1) {
echo usage: usps 01601531218002685498 >[1=2]
exit usage
}
rfork e
hget -p 'qtc_tLabels1='^$1 https://tools.usps.com/go/TrackConfirmAction |
2014-05-12 00:46:04 +00:00
htmlfmt > /tmp/usps.$pid
sam -d /tmp/usps.$pid >[2] /dev/null <<'!'
2015-06-17 16:07:32 +00:00
,/Tracking Number:/-1d
2014-08-01 18:44:58 +00:00
/Available Actions/,$d
,p
!
rm /tmp/usps.$pid