!/bin/bash
Define integer variables
t=100
b=75
Compute percentage with bc, preserving 2 decimal places
percentage=$(echo "scale=2; (t - b) / t * 100" | bc -l | sed 's/^./0./')
Output the result
echo "Percentage: $percentage%"
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)