nix-files/pkgs/additional/sane-scripts/src/sane-ip-check

5 lines
117 B
Plaintext
Raw Normal View History

2022-12-07 23:39:20 +00:00
#!/usr/bin/env bash
ip=$(curl --silent https://ipinfo.io/ip)
echo "$ip" | grep -P " *^\d+\.\d+\.\d+\.\d+ *$"
exit $?