Compare commits

..

2 Commits

1 changed files with 2 additions and 2 deletions

View File

@ -42,8 +42,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