.dotfiles/configs/zsh/functions/myip.zsh
2022-01-14 16:14:57 +01:00

9 lines
234 B
Bash

function myip(){
RES="$(curl -s ifconfig.co/json)"
echo $RES | jq -r ' .ip '
if [ "$1" = "-a" ]; then
echo "$(echo $RES | jq -r '.country') | $(echo $RES | jq -r '.city')"
echo "$(echo $RES | jq -r '.time_zone')"
fi
}