Welcome aboard! We are happy you are here and wish you good net-raft!
#!/bin/sh
#Simple request using curl from a shell script.
#If your OS supports a dual stack IPv4/IPv6 you can add -4 or -6 option
#to force protocol selection, e.g. $(curl -4 -s https://l2.io/ip).
myip=$(curl -s https://l2.io/ip)
echo "My IP is $myip"
The most helpful SHELL solutions
how to get client ip address using shell ?SHELL Click to see more ... 290 52