proxypi/root-bin/get_internet_ip

3 lines
83 B
Bash
Executable File

#!/bin/bash
ip -4 addr show ppp0 2>/dev/null | grep -oP '(?<=inet\s)\d+(\.\d+){3}'