echo "scale=2; $SECONDS / 60 / 60" | bc
# will give 2 digits after the decimal point, instead of bc -l which gives more digits of precision after the decimal point, than we may usually want for this particular calculation.
# will give 2 digits after the decimal point, instead of bc -l which gives more digits of precision after the decimal point, than we may usually want for this particular calculation.
awk "BEGIN { print int($SECONDS /60 /60)}"Modifying my example from above:
echo "scale=0; $SECONDS / 60 / 60" | bc
might also work, need to check.