tinyurl: geoff's rewrite accepts multiple URLs

front
stanley lieber 2011-08-14 23:10:46 -05:00
parent d33f36ccf9
commit c251b16db0
1 changed files with 4 additions and 5 deletions

View File

@ -1,7 +1,6 @@
#!/bin/rc
if(! ~ $#* 1) {
echo usage: tinyurl http://research.swtch.com/2008/02/hideous-name.html >[1=2]
exit usage
# tinyurl url
for (url) {
hget http://tinyurl.com/api-create.php?url'='$url
echo
}
hget http://tinyurl.com/api-create.php?url'='$1
echo