.dotfiles/.config/zsh/functions/myip.zsh

9 lines
234 B
Bash
Raw Permalink Normal View History

2022-01-14 16:14:57 +01:00
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
}