#!/bin/bash echo "🔍 Fetching your public IP info..." # Get JSON from ipinfo.io response=$(curl -s https://ipinfo.io/json) # Parse and print data ip=$(echo "$response" | grep '"ip":' | cut -d'"' -f4) city=$(echo "$response" | grep '"city":' | cut -d'"' -f4) region=$(echo "$response" | grep '"region":' | cut -d'"' -f4) country=$(echo "$response" | grep '"country":' | cut -d'"' -f4) org=$(echo "$response" | grep '"org":' | cut -d'"' -f4) echo "" echo "🌐 IP Address : $ip" echo "🏙️ Location : $city, $region, $country" echo "🏢 ISP : $org" echo ""