Commit fc500b1e authored by Dan Reading's avatar Dan Reading

Dealing with Gb need a larger scale.

parent 33c8cb51
......@@ -99,19 +99,20 @@ hbis() {
done
#echo ${FUNCNAME[0]}:${LINENO} base:$base number:$number bytes=$bytes c=$c
# make sure it a mult of 4
cd4=$(( c /4 ))
cd4m4=$(( cd4 * 4 ))
if [[ $c -eq $cd4m4 ]] ; then
cd8=$(( c / 8 ))
cd8m8=$(( cd8 * 8 ))
if [[ $c -eq $cd8m8 ]] ; then
:
# ok then if more then 30 count up make sure num is a multi of 4
# ok then if more then 30 count up make sure num is a multi of 8
elif [[ $c -gt 30 ]] ; then
c4=0
c8=0
# why does anything over report memory, talking about you d430
((--c))
while [ $c -ne $c4 ] ; do
# subtract half the size of the multiple
c=$(( c - 4 ))
while [ $c -ne $c8 ] ; do
((++c))
cd4=$(( c / 4 ))
c4=$(( cd4 * 4 ))
cd8=$(( c / 8 ))
c8=$(( cd8 * 8 ))
done
fi
echo ${c}GiB
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment