X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7b9972a1b7c3d3357a3089161831ca87e055fa61..cbc8c4ef2eb72511a58425e7590313d6b14a2b61:/examples/smpi/replay_multiple/generate_multiple_deployment.sh diff --git a/examples/smpi/replay_multiple/generate_multiple_deployment.sh b/examples/smpi/replay_multiple/generate_multiple_deployment.sh index c1272abb1a..5de54b4a13 100755 --- a/examples/smpi/replay_multiple/generate_multiple_deployment.sh +++ b/examples/smpi/replay_multiple/generate_multiple_deployment.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh -# Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. +# Copyright (c) 2007-2020. The SimGrid Team. All rights reserved. # This program is free software; you can redistribute it and/or modify it # under the terms of the license (GNU LGPL) which comes with this package. @@ -124,7 +124,7 @@ DESCRIPTIONFILE=$(echo $PROC_ARGS|cut -d' ' -f1) if [ -n "${DESCRIPTIONFILE}" ] && [ -f "${DESCRIPTIONFILE}" ]; then IFS_OLD=$IFS - IFS=$'\n' + IFS=$(printf '\n_'); IFS=${IFS%_} # protect trailing \n set -f NUMPROCS=0 while IFS= read -r line; do @@ -149,7 +149,7 @@ if [ -n "${DESCRIPTIONFILE}" ] && [ -f "${DESCRIPTIONFILE}" ]; then SEQ1=$( ${HAVE_SEQ} 0 $(( NUMPROCSMINE - 1 )) ) else cnt=0 - while (( cnt < NUMPROCSMINE )) ; do + while [ $(( cnt < NUMPROCSMINE )) -ne 0 ]; do SEQ1="$SEQ1 $cnt" cnt=$((cnt + 1)) done @@ -186,7 +186,7 @@ if [ -n "${DESCRIPTIONFILE}" ] && [ -f "${DESCRIPTIONFILE}" ]; then done # return IFS back to newline for "for" loop IFS_OLD=$IFS - IFS=$'\n' + IFS=$(printf '\n_'); IFS=${IFS%_} # protect trailing \n done < ${DESCRIPTIONFILE} # return delimiter to previous value