Skip to content

Instantly share code, notes, and snippets.

@fernvenue
Created February 22, 2023 05:42
Show Gist options
  • Save fernvenue/6598becaf371b9479cab3ec7ba6ce0bc to your computer and use it in GitHub Desktop.
Save fernvenue/6598becaf371b9479cab3ec7ba6ce0bc to your computer and use it in GitHub Desktop.
Get outbound IP address from Google.
#!/bin/bash
apt install -y pcregrep
curl -s "https://www.google.com/sorry/index" | pcregrep -o1 "IP address: (.*?)<"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment