From 0a296ef16aabeca4d7ab01f0772751fbba6fc210 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Thu, 21 Dec 2023 11:44:39 +0100 Subject: [PATCH] fix cut command containing = character --- inc_functions.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc_functions.sh b/inc_functions.sh index 93e2482..6636386 100644 --- a/inc_functions.sh +++ b/inc_functions.sh @@ -110,11 +110,11 @@ # icon=/images/icon.png # max_check_attempts=3 - checkName=$(cat "$_myconfig" | grep ^checkname= | cut -f 2 -d "=" | sed 's# #_#g') - checkCommand=$(cat "$_myconfig" | grep ^command_$MY_NAME= | cut -f 2 -d "=") - test -z "$checkCommand" && checkCommand=$(cat "$_myconfig" | grep ^command= | cut -f 2 -d "=") + checkName=$(cat "$_myconfig" | grep ^checkname= | cut -f 2- -d "=" | sed 's# #_#g') + checkCommand=$(cat "$_myconfig" | grep ^command_$MY_NAME= | cut -f 2- -d "=") + test -z "$checkCommand" && checkCommand=$(cat "$_myconfig" | grep ^command= | cut -f 2- -d "=") checkInterval=$(cat "$_myconfig" | grep ^interval= | cut -f 2 -d "=") - checkIcon=$(cat "$_myconfig" | grep ^icon= | cut -f 2 -d "=") + checkIcon=$(cat "$_myconfig" | grep ^icon= | cut -f 2- -d "=") checkMaxAttempts=$(cat "$_myconfig" | grep ^max_check_attempts= | cut -f 2 -d "=") } -- GitLab