tinyurl: sync with bell labs plan 9
This commit is contained in:
parent
6c343848ab
commit
e321b1b9d2
2 changed files with 20 additions and 0 deletions
7
rc/bin/tinyurl
Executable file
7
rc/bin/tinyurl
Executable file
|
@ -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
|
13
sys/man/1/tinyurl
Normal file
13
sys/man/1/tinyurl
Normal file
|
@ -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.
|
Loading…
Reference in a new issue