Compare commits
No commits in common. "af6aac242e5ca1de8a6408a6881f332e256bff90" and "4cdbaabcdf538fa5de9ec003656e072d99ea304e" have entirely different histories.
af6aac242e
...
4cdbaabcdf
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.
|
for RATIO in $(grep 'ratios' -A 8 pizza.txt | sed /\\[*.\\]/d | cut -f 2); do # finding [ratios] +8 tailing lines, removing the first.
|
||||||
((LABEL++))
|
((LABEL++))
|
||||||
grep 'ratios' -A 8 pizza.txt | sed /\\[*.\\]/d | cut -f 1 | sed $LABEL'!d' # same deal but itterating through the labels
|
grep 'ratios' -A 8 pizza.txt | sed /\\[*.\\]/d | cut -f 1 | sed $LABEL'!d' # same deal but itterating through the labels
|
||||||
echo "scale = 2; ($RATIO*$SIZE)/1" | bc -l # actually print the calculated number for each label
|
echo $RATIO*$SIZE | bc # 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
|
done
|
||||||
# cleanup
|
# cleanup
|
||||||
unset LABEL
|
unset LABEL
|
||||||
unset RATIO
|
unset RATIO
|
||||||
|
|
Loading…
Reference in New Issue