shithub: riscv

Download patch

ref: e321b1b9d2dcaa3176608496b419eb5a079f51ba
parent: 6c343848abffd8d4f0adcfb2d9507e4227dc1c68
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.
--