/ Published in: Bash
                    
                                        
Little script which call tinyurl.com via 'curl' for generate a sort url of the url you pass.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
#!/bin/sh
if [ -n "$1" ]; then
url="$1"
else
echo "Error: You must pass a URL"
exit
fi
curl -s http://tinyurl.com/create.php?url=${url} | awk -F\" '/name=tinyurl/ {print $2}'
Comments
 Subscribe to comments
                    Subscribe to comments
                
                