Last active
December 30, 2021 19:16
-
-
Save james-see/b5f50837b6211fa496ac78073aae8646 to your computer and use it in GitHub Desktop.
get just the bare public ip 4 address for eth0 on any VPS (tested on digital ocean and OVH Ubuntu 20.04)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip a | grep eth0 | cut -d " " --fields=6 | sed '2q;d' | awk -F'/' '{print $1}' | |
# curl -L https://cutt.ly/UUYcT1r | /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl -L https://cutt.ly/UUYcT1r | /bin/bash
for brevity