Skip to content

Instantly share code, notes, and snippets.

@quells
quells / whereami.sh
Last active August 29, 2015 14:03 — forked from ttscoff/whereami.sh
#!/bin/bash
alias whereami="get-location 2> /dev/null | sed -e 's/.*<\(.*\)>.*/\1/' | sed -e 's/\(.*\)/http:\/\/maps.googleapis.com\/maps\/api\/geocode\/json\?latlng\=\1\&sensor\=false/' | xargs curl -Ss | grep 'formatted_address' | head -n 1 | sed -e 's/[ \t]*\"formatted_address\" : \"\(.*\)\",/\1/'"