The script that automatically obtains the public network ip
I casually wrote a script to obtain the public network IP, which mainly distinguishes the difference between "" and ``.
#! / bin/baship_add= `curl-s-4 icanhazip.com `echo "public IP:$ip_add"
The above assignment "" in / bin/bash takes a string, while ``is the string after the instruction is run. Of course, it can also be applied to some scripts such as iptables,DNS on this basis.