- Filter output to remove errors and only keep IP

This commit is contained in:
2025-09-09 17:50:31 +02:00
parent 082f0a475e
commit 15b28c8f43
3 changed files with 14 additions and 2 deletions

View File

@@ -1,3 +1,3 @@
#!/bin/bash
dig +short myip.opendns.com @resolver1.opendns.com
dig +short myip.opendns.com @resolver1.opendns.com | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'