GIT – Use one of following commands to find public of your system using terminal. These are also useful to use in shell script.

1. Using wget

# wget -O - -q ; echo

Command 2: Using curl

# curl; echo

Command 3: Using curl

# curl -s| -e 's/.*Current IP Address: //' -e 's/<.*$//'

Command 4: Using curl

# curl

Command 5: Using curl

# curl
Get Public IP in Shell Script

PUBLIC_IP=`wget -O - -q ; echo`


Print Friendly



Bài viết liên quan