我无法弄清楚的简单问题......
如何在printf字符串中打印'%'字符?下面的代码打印出来,但也会出现"无效转换"错误.
printf "\t\t".$hour."00 HRS\t=>\t%.2f\t%.2f\t%.1f\%\n", $total, $max15, ($max15/$total*100);
Run Code Online (Sandbox Code Playgroud)
应输出如下内容:
0000 HRS => 3125.19 898.02 28.7%
Run Code Online (Sandbox Code Playgroud)