From: Arnaud Giersch Date: Tue, 16 Oct 2012 16:09:44 +0000 (+0200) Subject: Use double quotes around variable expansion to protect spaces. X-Git-Tag: v3_8~56 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/47c08390d2f3cee84c293760341ac34e86c5de94?ds=sidebyside Use double quotes around variable expansion to protect spaces. --- diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 2ef275777a..ef6b063108 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -224,7 +224,7 @@ if [ -n "${HOSTFILE}" ] && [ -f ${HOSTFILE} ]; then NUMHOSTS=`cat ${HOSTFILE} | wc -l` fi -if [ ${EXEC} = "./smpi_replay" ]; then +if [ "${EXEC}" = "./smpi_replay" ]; then APP_TRACES=$1; if [ -n "${APP_TRACES}" ] && [ -f ${APP_TRACES} ]; then hosttraces=(`cat ${APP_TRACES} | tr \\\n " "`) @@ -270,7 +270,7 @@ do fi echo " " >> ${APPLICATIONTMP} echo " " >> ${APPLICATIONTMP} - if [ ${EXEC} = "./smpi_replay" ]; then + if [ "${EXEC}" = "./smpi_replay" ]; then if [ ${NUMTRACES} -gt 1 ]; then echo " " >> ${APPLICATIONTMP} else