Changeset 1435


Ignore:
Timestamp:
07/30/09 12:50:40 (16 years ago)
Author:
seroussi
Message:

no SEQ function on mac

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/cron/report.sh

    r1406 r1435  
    129129
    130130                # go through the lines of $package.log
    131                 for i in $(seq 1 1 `wc -l $package.log | awk '{printf("%s",$1);}'`); do
     131                COUNTER=1
     132                MAX=`wc -l $package.log | awk '{printf("%s",$1);}'`
     133                while [  $COUNTER -lt $MAX ]; do
     134                        let COUNTER=COUNTER+1
    132135
    133136                        echo "<tr>"
    134137
    135138                        #see wether it is success or error (get color: red or green)
    136                         if [ "`cat $package.log | awk '{ printf "line%so %s\n", NR, $0 }' | awk '/line'$i'o/ {printf("%s\n",$2);}';`" == "SUCCESS" ]; 
     139                        if [ "`cat $package.log | awk '{ printf "line%so %s\n", NR, $0 }' | awk '/line'$COUNTER'o/ {printf("%s\n",$2);}';`" == "SUCCESS" ]; 
    137140                        then
    138141                                color="bgcolor=#ddffdd";
     
    142145
    143146                        #build html corresponding line
    144                         cat $package.log | awk '{ printf "line%so %s\n", NR, $0 }' | awk '/line'$i'o/ {printf("<td '$color' style=\"font-size:14px;\">%s</td><td '$color' style=\"font-size:14px;\"> %s%s%s</td><td '$color' style=\"font-size:14px;\"> %s</td><td '$color' style=\"font-size:14px;\"> %s</td><td '$color' style=\"font-size:14px;\"> %s</td>",$2,$4,$5,$6,$8,$10,$14);}';
     147                        cat $package.log | awk '{ printf "line%so %s\n", NR, $0 }' | awk '/line'$COUNTER'o/ {printf("<td '$color' style=\"font-size:14px;\">%s</td><td '$color' style=\"font-size:14px;\"> %s%s%s</td><td '$color' style=\"font-size:14px;\"> %s</td><td '$color' style=\"font-size:14px;\"> %s</td><td '$color' style=\"font-size:14px;\"> %s</td>",$2,$4,$5,$6,$8,$10,$14);}';
    145148                        echo "</tr>"
    146149                done
Note: See TracChangeset for help on using the changeset viewer.