2011-03-30 14:14:36 +00:00
|
|
|
#!/bin/rc
|
|
|
|
rfork en
|
|
|
|
|
|
|
|
|
|
|
|
if(! ~ $#* 1) {
|
|
|
|
echo usage: usps 01601531218002685498 >[1=2]
|
|
|
|
exit usage
|
|
|
|
}
|
|
|
|
|
|
|
|
rfork e
|
|
|
|
|
2012-03-16 08:24:14 +00:00
|
|
|
hget -p 'qtc_tLabels1='^$1 https://tools.usps.com/go/TrackConfirmAction |
|
2014-05-12 00:46:04 +00:00
|
|
|
htmlfmt > /tmp/usps.$pid
|
2011-03-30 14:14:36 +00:00
|
|
|
|
|
|
|
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
|
2011-03-30 14:14:36 +00:00
|
|
|
,p
|
|
|
|
!
|
|
|
|
rm /tmp/usps.$pid
|