From: Arnaud Giersch Date: Tue, 12 Nov 2013 21:01:50 +0000 (+0100) Subject: Using strings of different lengths with tr is unspecified. X-Git-Tag: v3_11_beta~334 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/546aeb463c884feaec5e59ae877087aebcfbb98a Using strings of different lengths with tr is unspecified. --- diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 3b34dbfe94..2f38ee63da 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -274,14 +274,14 @@ APPLICATIONHEAD ##---- cache hostnames of hostfile--------------- if [ -n "${HOSTFILE}" ] && [ -f ${HOSTFILE} ]; then - hostnames=$(cat ${HOSTFILE} | tr \\\n\\\r " ") + hostnames=$(cat ${HOSTFILE} | tr '\n\r' ' ') NUMHOSTS=$(cat ${HOSTFILE} | wc -l) fi if [ "${EXTOPT}" = "smpi_replay" ]; then APP_TRACES=$PROC_ARGS if [ -n "${APP_TRACES}" ] && [ -f "${APP_TRACES}" ]; then - hosttraces=$(cat ${APP_TRACES} | tr \\\n\\\r ' ' ) + hosttraces=$(cat ${APP_TRACES} | tr '\n\r' ' ' ) NUMTRACES=$(cat ${APP_TRACES} | wc -l) else printf "File not found: %s\n", "${APP_TRACES:-\${APP_TRACES\}}" >&2