shithub: riscv

ref: acf6c4a6a4ea6d3b66306bd0d2e9b8af1a92d4a2
dir: /rc/bin/usps/

View raw version
#!/bin/rc
rfork en


if(! ~ $#* 1) {
	echo usage: usps 01601531218002685498 >[1=2]
	exit usage
}

rfork e

hget -p 'origTrackNum='^$1 http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do |
	htmlfmt > /tmp/usps.$pid

sam -d /tmp/usps.$pid >[2] /dev/null <<'!'
0,/Label/-1d
/^Enter Label/,$d
,p
!
rm /tmp/usps.$pid