From 3126864255231efdcfaa90c779e3a9670d64ce8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Thu, 28 Jan 2021 11:27:19 +0100 Subject: [PATCH] =?UTF-8?q?Use=20`find=20=E2=80=A6=20-delete`=20to=20remov?= =?UTF-8?q?e=20file=20with=20pattern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cluster/sge.enable.host.queue.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cluster/sge.enable.host.queue.sh b/cluster/sge.enable.host.queue.sh index 7622cd3..3efb200 100755 --- a/cluster/sge.enable.host.queue.sh +++ b/cluster/sge.enable.host.queue.sh @@ -374,7 +374,8 @@ is_queue_disable() { # {{{ return_queue_disable="1" ## Ensure to remove any previously setted file - rm -f -- "${sge_queue_flag_file}" + # shellcheck disable=SC2086 + find ${sge_queue_flag_file} -delete ;; 3 ) ## Results (header + queue name) so the queue is disable local_sge_queue_state="disable" @@ -507,9 +508,10 @@ for host: ${RED}${sge_hostname:=/dev/null}${COLOR_DEBUG}." ## If the queue(s) are already enable ### Ensure to remove any potential flag file + # shellcheck disable=SC2086 ### Exit is_all_queue_enable "${sge_hostname}" "${sge_queues_name}" \ - && rm -f -- "${sge_queue_flag_pattern}" \ + && find ${sge_queue_flag_pattern} -delete \ && exit 0 ## Test all queues one by one