From fc289854258bc3504557d25b08447c7d5c14f54a Mon Sep 17 00:00:00 2001 From: "Bastian M. Wojek" Date: Wed, 29 Apr 2009 14:44:37 +0000 Subject: [PATCH] Added the possibility to have commented (with preceding #) and empty lines in a runlist-file for msr2data --- src/external/scripts/msr2data | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/external/scripts/msr2data b/src/external/scripts/msr2data index 404451b9..3c3b4ee5 100644 --- a/src/external/scripts/msr2data +++ b/src/external/scripts/msr2data @@ -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