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 <<'!'
|
2013-10-15 19:47:56 +00:00
|
|
|
,/Tracking Number/-1d
|
|
|
|
/Available Options/,$d
|
2011-03-30 14:14:36 +00:00
|
|
|
,p
|
|
|
|
!
|
|
|
|
rm /tmp/usps.$pid
|