9 lines
307 B
Bash
9 lines
307 B
Bash
|
ENUMERATOR=$(rg "to-todo" -c -I | paste -sd+ | bc)
|
||
|
DENOMINATOR=$(rg "pub mod" ./src/types/api/ -c -I | paste -sd+ | bc)
|
||
|
|
||
|
echo "$ENUMERATOR.0/$DENOMINATOR.0"
|
||
|
UNDONE=$(echo "scale=2; ($ENUMERATOR * 100)/$DENOMINATOR" | bc )
|
||
|
DONE=$(echo "scale=2; 100 - $UNDONE" | bc)
|
||
|
echo done: $DONE %
|
||
|
echo undone: $UNDONE %
|