round nubers to the hundredth
This commit is contained in:
parent
9ca3fca632
commit
5d6c422e56
1 changed files with 2 additions and 2 deletions
4
pizza.sh
4
pizza.sh
|
@ -37,8 +37,8 @@ function calcratio { # this is mildly hacky
|
|||
for RATIO in $(grep 'ratios' -A 8 pizza.txt | sed /\\[*.\\]/d | cut -f 2); do # finding [ratios] +8 tailing lines, removing the first.
|
||||
((LABEL++))
|
||||
grep 'ratios' -A 8 pizza.txt | sed /\\[*.\\]/d | cut -f 1 | sed $LABEL'!d' # same deal but itterating through the labels
|
||||
echo $RATIO*$SIZE | bc # actually print the calculated number for each label
|
||||
done
|
||||
echo "scale = 2; ($RATIO*$SIZE)/1" | bc -l # actually print the calculated number for each label
|
||||
done # we have to divide by 1 to.get the base to reset to actually apply the scale
|
||||
# cleanup
|
||||
unset LABEL
|
||||
unset RATIO
|
||||
|
|
Loading…
Add table
Reference in a new issue