File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -135,11 +135,11 @@ runs:
135135 formatByteCount() {
136136 bytes=$1
137137 if [ "$bytes" -lt "0" ]; then
138- kilobytes=$(echo " -$1 * 1000" |bc -l )
138+ kilobytes=$(awk "BEGIN {printf \"%.2f\", -$1 * 1000}" )
139139 else
140- kilobytes=$(echo " $1 * 1000" |bc -l )
140+ kilobytes=$(awk "BEGIN {printf \"%.2f\", $1 * 1000}" )
141141 fi
142- echo $(numfmt --to=iec-i --suffix=B --padding=7 ${kilobytes});
142+ echo $(numfmt --to=iec-i --suffix=B --padding=7 ${kilobytes});
143143 }
144144
145145 # macro to output saved space
@@ -154,7 +154,6 @@ runs:
154154 RATE=$(awk "BEGIN {printf \"%.2f\", ( $saved / 1000000.0 ) /($time + $epsilon)}")
155155 gigabytes_saved=$(formatByteCount $saved)
156156 gigabytes_saved=$(formatByteCount $saved)
157- echo ":$gigabytes_saved:$saved:$time:$title:"
158157 echo "=> ${title}: Saved $gigabytes_saved: in ${time} seconds : rate = ${RATE} GB/sec"
159158 printSeparationLine '*' 80
160159 echo ""
You can’t perform that action at this time.
0 commit comments