BUG: foamPrintJobs: handle hostnames being strings, not words

This commit is contained in:
mattijs
2011-11-15 15:08:30 +00:00
parent f1e0067c3d
commit af4c4812de

View File

@ -236,9 +236,9 @@ rm -f $TMPFILE; touch $TMPFILE
RUNJOBS=`getAllJobs $FOAM_JOB_DIR/runningJobs` RUNJOBS=`getAllJobs $FOAM_JOB_DIR/runningJobs`
for f in $RUNJOBS for f in $RUNJOBS
do do
machinePid=`basename $f` machinePid=`basename $f | sed -e 's/^"//' -e 's/"$//'`
machine=`echo $machinePid | sed -e 's/\.[0-9][0-9]*$//'` machine=`echo "$machinePid" | sed -e 's/\.[0-9][0-9]*$//'`
pid=`echo $machinePid | sed -e 's/.*\.\([0-9][0-9]*\)$/\1/'` pid=`echo "$machinePid" | sed -e 's/.*\.\([0-9][0-9]*\)$/\1/'`
fgrep "$machine" $TMPFILE >/dev/null 2>&1 fgrep "$machine" $TMPFILE >/dev/null 2>&1
if [ $? -ne 0 ] if [ $? -ne 0 ]