aboutsummaryrefslogblamecommitdiffstats
path: root/shorten.sh
blob: 2a2ef622cfadf17e46a11b21ccc5ecfa31df5215 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

         

                                                              






                                                            
#!/bin/sh

# check out https://github.com/chubin/awesome-console-services

if [ "$#" -ne 1 ] ; then
    echo "Please provide a single URL parameter to shorten."
    exit 1 
fi

result=$(curl -s tinyurl.com/api-create.php?url="$1")
echo "$result"