diff options
author | stanley lieber <stanley.lieber@gmail.com> | 2011-07-29 16:36:19 -0500 |
---|---|---|
committer | stanley lieber <stanley.lieber@gmail.com> | 2011-07-29 16:36:19 -0500 |
commit | e321b1b9d2dcaa3176608496b419eb5a079f51ba (patch) | |
tree | ff2679472e9d9a03b7dd5826f3f552fc6ca549a7 | |
parent | 6c343848abffd8d4f0adcfb2d9507e4227dc1c68 (diff) |
tinyurl: sync with bell labs plan 9
-rwxr-xr-x | rc/bin/tinyurl | 7 | ||||
-rw-r--r-- | sys/man/1/tinyurl | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/rc/bin/tinyurl b/rc/bin/tinyurl new file mode 100755 index 000000000..da4b695e0 --- /dev/null +++ b/rc/bin/tinyurl @@ -0,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 diff --git a/sys/man/1/tinyurl b/sys/man/1/tinyurl new file mode 100644 index 000000000..3dd548817 --- /dev/null +++ b/sys/man/1/tinyurl @@ -0,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. |