Plan 9 from Bell Labs’s /usr/web/sources/patch/applied/usps-update-20090708/usps.orig

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
rfork en


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

rfork e

hget -p 'tracknbr='^$1 http://www.framed.usps.com/cgi-bin/cttgate/ontrack.cgi |
	tr -d '
' |
	sed 's/<[^>]*>//g' | 
	sed 's/\&quot;/"/g;s/\&lt;/</g;s/\&gt;/>/g;s/\&amp;/\&/g' |
	sed 's/\&(copy|nbsp);//' |
	grep -v Copyright |
	grep -v 'You can track' |
	grep -v 'Enter the number' |
	grep -v 'Item Number:' |
	sed 's/[ 	]*$//' |
	uniq |
	fmt


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].