Annotation of badi/public_scripts/parallelstarter/biogeme/generate_arglist, revision 1.1

1.1     ! adi         1: # Prepare biogeme to be run with parallelstarter:
        !             2: # generate arglist from $BIOGEME_ARGS_FILE
        !             3: 
        !             4: if [ -e "$ARGLIST_FILE" ]; then
        !             5:        rm "$ARGLIST_FILE"
        !             6: fi
        !             7: 
        !             8: if [ ! -e "$BIOGEME_ARGS_FILE" ]; then
        !             9:        echo "Parallelstarter needs a configuration file for the biogeme runs you intend to execute."
        !            10:        echo "File not found: $BIOGEME_ARGS_FILE"
        !            11:        exit 1
        !            12: fi
        !            13: 
        !            14: while read biogeme_argline; do
        !            15: 
        !            16:        # ignore comment and empty lines
        !            17:        if [ $(echo "$biogeme_argline" | egrep -c "^[ \t]*#.*$") -gt 0 ]; then
        !            18:               continue
        !            19:        fi
        !            20:        
        !            21:        # ignore empty lines or malformed lines
        !            22:        if [ $(echo "$biogeme_argline" | sed 's/[^:]//g' | wc -m) -ne 3 ]; then
        !            23:                continue
        !            24:        fi
        !            25: 
        !            26:         RUN_NAME="`echo $(echo "$biogeme_argline" | awk -F ':' '{print $1}')`"
        !            27: 
        !            28:        echo "$RUN_NAME $RUN_NAME.dat" >> "$ARGLIST_FILE"
        !            29:        
        !            30: 
        !            31: done < "$BIOGEME_ARGS_FILE"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>