Added the possibility to have commented (with preceding #) and empty lines in a runlist-file for msr2data
This commit is contained in:
5
src/external/scripts/msr2data
vendored
5
src/external/scripts/msr2data
vendored
@ -180,14 +180,17 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
numberOfReadInLines=0
|
numberOfReadInLines=0
|
||||||
|
numberOfComments=0
|
||||||
|
|
||||||
exec 3< $1 # open file for reading in the runlist-file the first time and get the runnumbers to be processed
|
exec 3< $1 # open file for reading in the runlist-file the first time and get the runnumbers to be processed
|
||||||
while read -u 3 -a runList
|
while read -u 3 -a runList
|
||||||
do
|
do
|
||||||
if [ "$numberOfReadInLines" -eq 0 ]; then
|
if [ "$numberOfReadInLines" -eq 0 ]; then
|
||||||
NUM_OF_IND_VAR=${#runList[@]}
|
NUM_OF_IND_VAR=${#runList[@]}
|
||||||
|
elif [ "${runList[0]:0:1}" == "#" ] || [ "${runList[0]}" == "" ]; then
|
||||||
|
((numberOfComments++))
|
||||||
else
|
else
|
||||||
RUNARRAY[(( numberOfReadInLines - 1 ))]=${runList[0]}
|
RUNARRAY[(( numberOfReadInLines - numberOfComments - 1 ))]=${runList[0]}
|
||||||
fi
|
fi
|
||||||
((numberOfReadInLines++))
|
((numberOfReadInLines++))
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user