git: 9front

Download patch

ref: 534201f2f9102445599622af4318571b91551719
parent: 4dd3cf7f2b486173df31137b08ae59bf9ef72df4
author: stanley lieber <stanley.lieber@gmail.com>
date: Fri Jul 29 12:36:19 EDT 2011

tinyurl: sync with bell labs plan 9

--- /dev/null
+++ b/rc/bin/tinyurl
@@ -1,0 +1,7 @@
+#!/bin/rc
+if(! ~ $#* 1) {
+	echo usage: tinyurl http://research.swtch.com/2008/02/hideous-name.html >[1=2]
+	exit usage
+}
+hget http://tinyurl.com/api-create.php?url'='$1
+echo
--- /dev/null
+++ b/sys/man/1/tinyurl
@@ -1,0 +1,13 @@
+.TH TINYURL 1
+.SH NAME
+tinyurl \- shrink a URL
+.SH SYNOPSIS
+.B tinyurl
+.I URL
+.SH DESCRIPTION
+.I Exchanges
+a long URL for a shorter URL utilizing the API at tinyurl.com.
+.SH SOURCE
+.B /rc/bin
+.SH BUGS
+Redesigns of the source website can break this program.
--