morganestes
12/9/2014 - 9:37 PM

Bash script to shorten a GitHub link using Git.io

Bash script to shorten a GitHub link using Git.io

#!/usr/bin/env bash

echo `curl -s -i http://git.io -F "url=$1" | tr -d '\r' | sed -En 's/^Location: (.*)/\1/p'`