From 15b28c8f434ce4dbf50253646b6a79846faa98e6 Mon Sep 17 00:00:00 2001 From: "Arnaud G. GIBERT" Date: Tue, 9 Sep 2025 17:50:31 +0200 Subject: [PATCH] - Filter output to remove errors and only keep IP --- ReleaseNotes.txt | 9 +++++++++ SPEC/myip.spec | 5 ++++- bin/myip | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 133bf55..5cf7b80 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,3 +1,12 @@ + +------------------------------------------------------------------------------------------------------------------------------------ +MyIP V 1.0.1 - A. GIBERT - 2025/07/26 +------------------------------------------------------------------------------------------------------------------------------------ + +- Filter output to remove errors and only keep IP + + + ------------------------------------------------------------------------------------------------------------------------------------ MyIP V 1.0.0 - A. GIBERT - 2025/04/25 ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/SPEC/myip.spec b/SPEC/myip.spec index 467b0f8..a348bbf 100644 --- a/SPEC/myip.spec +++ b/SPEC/myip.spec @@ -1,5 +1,5 @@ %define name myip -%define version 1.0.0 +%define version 1.0.1 %define release %mkrel 1rx3 %global debug_package %{nil} @@ -50,5 +50,8 @@ install -D -pm 755 %{name} $RPM_BUILD_ROOT%{_bindir}/%{name} %changelog +* Sat Jul 26 2025 Arnaud G. GIBERT - 1.0.1-1rx3.mga9 +- Filter output to remove errors and only keep IP + * Sun Apr 6 2025 Arnaud G. GIBERT - 1.0.0-1rx3.mga9 - Create initial SPEC file for 1.0.0 on Mageia 9 diff --git a/bin/myip b/bin/myip index 7052b07..0255724 100755 --- a/bin/myip +++ b/bin/myip @@ -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]+$'