Simple problem that I can't figure out...
How can I print a '%' character within a printf
string? The code below prints it, but gives an 'invalid conversion' error as well.
printf "\t\t".$hour."00 HRS\t=>\t%.2f\t%.2f\t%.1f\%\n", $total, $max15, ($max15/$total*100);
Should output something like:
0000 HRS => 3125.19 898.02 28.7%
You would use %%, not \% (from man printf)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With