If you have bitcoin cli installed. The below command will help.
echo `bitcoin-cli getblockcount 2>&1`/`wget -O - http://blockchain.info/q/getblockcount 2>/dev/null`
Sample output
365320/512421
This is slight improvement of above answer. But it returned Error: Command line contains unexpected token 'getblockcount', see bitcoind -h for a list of options./512421
in my case. Hope it helps someone.