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 02:46:04 +02:00
htmlfmt > /tmp/usps.$pid
sam -d /tmp/usps.$pid >[2] /dev/null <<'!'
2015-06-17 18:07:32 +02:00
,/Tracking Number:/-1d
2014-08-01 20:44:58 +02:00
/Available Actions/,$d
,p
!
rm /tmp/usps.$pid