From 1ac9cb9e509cb84c12e0a7c406067a2c4223b4a5 Mon Sep 17 00:00:00 2001 From: Thomas Constans Date: Sat, 24 Jul 2021 09:42:49 +0200 Subject: [PATCH] mise au point commandStdoutPattern --- functions.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/functions.sh b/functions.sh index 7ebd43a..d5ef7a2 100644 --- a/functions.sh +++ b/functions.sh @@ -236,10 +236,10 @@ function commandIsWorking { # arg2: command # arg3: pattern function commandStdoutPattern { - chroot=$1 - command=$2 - shift - pattern=$@ + local chroot=$1 + local command=$2 + local pattern="$3" + result=$(chroot ${chroot} bash -c "$command") if ( echo -n "$result" | grep -qiE "${pattern}" ) ; then echo -ne "1;" ; else echo -ne "0;" ; fi }