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 |
|
|
|
|
uhtml | htmlfmt > /tmp/usps.$pid
|
2011-03-30 14:14:36 +00:00
|
|
|
|
|
|
|
sam -d /tmp/usps.$pid >[2] /dev/null <<'!'
|
2012-03-16 08:24:14 +00:00
|
|
|
,/Your Label Number/-1d
|
|
|
|
/Check on Another Item/,$d
|
|
|
|
/id=\"error-tLabels\"/,$d
|
2011-03-30 14:14:36 +00:00
|
|
|
,p
|
|
|
|
!
|
|
|
|
rm /tmp/usps.$pid
|