svn path=/trunk/; revision=125
| tr '\r' '\n' \
| sed -urn '1~5s;^.* V: +([0-9]+)(\.[0-9]+) A-V:.*$;\1;p' \
| while read m; do
- printf "%s\n" "$(($m * 100 / $length))"
+ printf "%d %d:%02d\n" "$(($m * 100 / $length))" "$(($m / 60))" "$(($m % 60))"
done \
| while read n; do
[ "$n" != "$previous" ] && printf "%s\n" "$n"
- previous=$n
+ previous="$n"
done
}
cnt=0
progress \
-| while read n; do
- printf '<span class="progress"><span style="width: %s%%;">%s</span></span>\n' $n $n
+| while read p t; do
+ printf '<span class="progress"><span style="width: %d%%;">%s</span></span>\n' "${p}" "${t}"
done
# vi:set filetype=html: