To calculate the total average of three grades in a shell terminal, you can use the following command:
<code class="language-bash">echo "scale=2; ($grade1 + $grade2 + $grade3) / 3" | bc </code>
Replace $grade1, $grade2, and $grade3 with the actual grade values. The scale=2 sets the output to two decimal places, and bc is a calculator tool used for floating-point arithmetic.
Copyright © 2026 eLLeNow.com All Rights Reserved.