Changeset 1435
- Timestamp:
- 07/30/09 12:50:40 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/cron/report.sh
r1406 r1435 129 129 130 130 # 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 132 135 133 136 echo "<tr>" 134 137 135 138 #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" ]; 137 140 then 138 141 color="bgcolor=#ddffdd"; … … 142 145 143 146 #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);}'; 145 148 echo "</tr>" 146 149 done
Note:
See TracChangeset
for help on using the changeset viewer.