diff --git a/cluster/maco.check.update.sh b/cluster/maco.check.update.sh index b095332..b851980 100755 --- a/cluster/maco.check.update.sh +++ b/cluster/maco.check.update.sh @@ -225,7 +225,7 @@ if [ ! "${NBARGS}" -eq "0" ]; then manage_arg="0" # Parse all options (start with a "-") one by one - while printf -- '%s' "${1}" | grep -q -E -- "^-*"; do + while printf -- '%s' "${1}" | grep -q -E -- "^-+"; do case "${1}" in -h|--help ) ## help diff --git a/cluster/sge.enable.host.queue.sh b/cluster/sge.enable.host.queue.sh index b31ea85..37e3d17 100755 --- a/cluster/sge.enable.host.queue.sh +++ b/cluster/sge.enable.host.queue.sh @@ -320,7 +320,7 @@ if [ ! "${NBARGS}" -eq "0" ]; then manage_arg="0" ## If the first argument is not an option - if ! printf -- '%s' "${1}" | grep -q -E -- "^-*"; + if ! printf -- '%s' "${1}" | grep -q -E -- "^-+"; then ## Use this argument for sge_hostname sge_hostname="${1}" @@ -337,7 +337,7 @@ if [ ! "${NBARGS}" -eq "0" ]; then fi # Parse all options (start with a "-") one by one - while printf -- '%s' "${1}" | grep -q -E -- "^-*"; do + while printf -- '%s' "${1}" | grep -q -E -- "^-+"; do case "${1}" in -d|--debug ) ## debug