From 47c08390d2f3cee84c293760341ac34e86c5de94 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 16 Oct 2012 18:09:44 +0200 Subject: [PATCH] Use double quotes around variable expansion to protect spaces. --- src/smpi/smpirun.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.20.1