diff options
author | stanley lieber <stanley.lieber@gmail.com> | 2011-08-14 23:10:46 -0500 |
---|---|---|
committer | stanley lieber <stanley.lieber@gmail.com> | 2011-08-14 23:10:46 -0500 |
commit | c251b16db09e31c71e1bd619aa041a13bb3034fc (patch) | |
tree | 7d8a54256f21ce509ff7835f4d88f6aa9cc47c83 | |
parent | d33f36ccf9e1d31dcab79889505b767afa8df120 (diff) | |
download | plan9front-c251b16db09e31c71e1bd619aa041a13bb3034fc.tar.xz |
tinyurl: geoff's rewrite accepts multiple URLs
-rwxr-xr-x | rc/bin/tinyurl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/rc/bin/tinyurl b/rc/bin/tinyurl index da4b695e0..92e1251ef 100755 --- a/rc/bin/tinyurl +++ b/rc/bin/tinyurl @@ -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 |