From e288412220acb2a9e05dae9a67cbce93053bb1fa Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Wed, 6 Sep 2023 14:38:21 +0200
Subject: [PATCH] fix _list when filtering by -r REGEX

---
 check_systemdunit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/check_systemdunit b/check_systemdunit
index e04f6c3..2f62cb9 100755
--- a/check_systemdunit
+++ b/check_systemdunit
@@ -103,7 +103,7 @@ fi
 # --- find a service by regex
 if ph.hasParamoption "r" "$@" ; then
   _regex="${2}"
-  _list=$( _getUnits | awk '{ print $1 }' | grep -v '[^a-z\.\-]' | sort )
+  _list=$( _getUnits | awk '{ print $1 }' | sort )
   _unit=$( grep -E "$_regex" <<< "$_list" )
 
   if [ -z "$_unit" ]; then
-- 
GitLab