shithub: riscv

ref: 90b4fe9cf65bb24b55472ce2e32a7dbc3c5e7f97
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 'qtc_tLabels1='^$1 https://tools.usps.com/go/TrackConfirmAction |
	htmlfmt > /tmp/usps.$pid

sam -d /tmp/usps.$pid >[2] /dev/null <<'!'
,/Tracking Number/-1d
/Available Actions/,$d
,p
!
rm /tmp/usps.$pid