Compare commits
2 Commits
771a943c55
...
9ab116d057
Author | SHA1 | Date |
---|---|---|
ida schmidt | 9ab116d057 | |
ida schmidt | c184cd019a |
9
pizza.sh
9
pizza.sh
|
@ -26,7 +26,7 @@ while getopts ":hf:" option; do
|
||||||
done
|
done
|
||||||
|
|
||||||
function panarea {
|
function panarea {
|
||||||
AREA=$(echo "3.1415926535*($DIAM/2)^2" | bc)
|
AREA=$(echo "3.1415926535*($DIAM/2)^2" | bc -l)
|
||||||
SIZE=$(echo $AREA*$FSI | bc)
|
SIZE=$(echo $AREA*$FSI | bc)
|
||||||
calcratio
|
calcratio
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,13 @@ function calcratio {
|
||||||
grep 'ratios' -A 8 pizza.txt | sed /\\[*.\\]/d | cut -f 1 | sed $LABEL'!d'
|
grep 'ratios' -A 8 pizza.txt | sed /\\[*.\\]/d | cut -f 1 | sed $LABEL'!d'
|
||||||
echo $RATIO*$SIZE | bc
|
echo $RATIO*$SIZE | bc
|
||||||
done
|
done
|
||||||
|
# cleanup
|
||||||
|
unset LABEL
|
||||||
|
unset RATIO
|
||||||
|
unset SIZE
|
||||||
|
unset FSI
|
||||||
|
unset AREA
|
||||||
|
unset DIAM
|
||||||
}
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
Loading…
Reference in New Issue