Added the possibility to have commented (with preceding #) and empty lines in a runlist-file for msr2data
This commit is contained in:
parent
ea0800b4fe
commit
fc28985425
5
src/external/scripts/msr2data
vendored
5
src/external/scripts/msr2data
vendored
@ -180,14 +180,17 @@ else
|
||||
fi
|
||||
|
||||
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
|
||||
while read -u 3 -a runList
|
||||
do
|
||||
if [ "$numberOfReadInLines" -eq 0 ]; then
|
||||
NUM_OF_IND_VAR=${#runList[@]}
|
||||
elif [ "${runList[0]:0:1}" == "#" ] || [ "${runList[0]}" == "" ]; then
|
||||
((numberOfComments++))
|
||||
else
|
||||
RUNARRAY[(( numberOfReadInLines - 1 ))]=${runList[0]}
|
||||
RUNARRAY[(( numberOfReadInLines - numberOfComments - 1 ))]=${runList[0]}
|
||||
fi
|
||||
((numberOfReadInLines++))
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user