Compare commits
2 Commits
4cdbaabcdf
...
af6aac242e
Author | SHA1 | Date |
---|---|---|
ida schmidt | af6aac242e | |
ida schmidt | 5d6c422e56 |
4
pizza.sh
4
pizza.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue