From 47d706074369abb7dcc256e8c6a89fe2c136d019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Mon, 6 Jul 2020 15:30:32 +0200 Subject: [PATCH] find allow to use pattern to verify if file exists --- cluster/sge.enable.host.queue.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cluster/sge.enable.host.queue.sh b/cluster/sge.enable.host.queue.sh index 2913f72..049642b 100755 --- a/cluster/sge.enable.host.queue.sh +++ b/cluster/sge.enable.host.queue.sh @@ -230,7 +230,8 @@ is_file_present() { # {{{ return_is_file_present="1" ### Check if the file exists - if [ -f "${local_file_path}" ]; then + # shellcheck disable=SC2086 + if find ${local_file_path} > /dev/null 2>&1; then return_is_file_present="0" debug_message "is_file_present − \ The file ${RED}${local_file_path}${COLOR_DEBUG} exists."